AnsweredAssumed Answered

Getting field contents and setting field

Question asked by JoelMG on Sep 24, 2011
Latest reply on Sep 27, 2011 by philmodjunk


Getting field contents and setting field


Two beginner's questions, please:

The scenario:  A script which takes user input and generates new records in one table/layout from a found set of records in another table/layout.

Specificially:  The script now does a Find, generating a found set in Layout1.  The user is then asked for an ID number.  I want to generate new records in Layout2, placing the ID number in Field1 of all new records, and populating Field2 with contents of a field from Layout1 of the found set.

The two problems I'm having:

Question 1: How do I place the ID number in the new records?  It automatically places it in new record 1.  How do I place it in the others?

Question 2: How do I "get" the contents of a field from Layout1 into Layout2?  I understand Set Field.  But getField in a calculation gets the contents of only the first record.  Can I specify to get field contents from the next record in the set?

I'd appreciate any advice.  Thanks.