AnsweredAssumed Answered

Script to revise data entry in a field

Question asked by k1ngf1sher on Apr 29, 2010
Latest reply on Apr 29, 2010 by philmodjunk

Title

Script to revise data entry in a field

Post

Hi all, I am trying to write a script that will do the following using data from two related tables (D and S)

 

Upon commiting the value in S::FieldID (value list),a script trigger runs the following script:

 

If S::FieldName is empty, then copy D::FieldName to S::FieldName.

 

If S:Fieldname is not empty (that is, it was entered previously upon selection of a FieldID) and S::FieldID is different from the original entry, then change the S::Fieldname to the D::FieldName.

 

I thought I had the script correct, but then my client disclosed that he would like to make certain the S::FieldName would change if he changed the S::FieldID.  I have chosen not to use the related field to automatically complete the S::FieldName, but my client needs the option of manually filling the field (just in case).

 

Any help would be appreciated.  I cannot figure out the proper order of script terms to get this to work, so any insights would be great.

 

Cheers,

K

Outcomes