AnsweredAssumed Answered

Defining Repeating Field Values

Question asked by Atkins on Feb 19, 2013
Latest reply on Feb 19, 2013 by philmodjunk


Defining Repeating Field Values



     I'm mostly done with a task I'm trying to figure out, but hanging up when it comes to repeating fields.  Here's what I'm trying to do:  I'm entering a series of unique key fields manually.  I'd like each one to log in a repeating field, incrementing the repetiion by 1 each time.  At the end I want to display a list of information and "highlight" each line that was entered in the previous step.  If I manually enter the test numbers in the different repetitions of my repeating field, the highlight feature works fine.  What I'm not able to do is store my numbers into the repetitions.

     I tried using variables first, thinking that would be easiest.  That didn't work so I created an actual field for my repeating field, and that didn't work, so I tried making it a global field.  I have the max number of repetitions set to 50 but I don't anticipate ever using more than about 20.  For the repetition number in my script I'm using a variable that increments each time the script runs, so the first repetition would be 1, then 2, then 3, etc.  When you finish, this variable resets to 0.

     As I said before, I think the only issue I'm having is that the numbers I'm inputting aren't storing in the repeating field.  I have a layout where I can see all the repetitions at once and it just stays blank every time I go through the process.  If I manually enter data, it works, but that's not the point...  So to store data in different repetitions I'm currently using:


          Set Variable [$$CO_Mult_Count; Value:$$CO_Mult_Count + 1]


          Insert Calculated Result [Select; Inventory::CTS_CO[$$CO_Mult_Count]; Inventory::kf_CTS_ID]

  •           The variable is the counter for my repetitions, and you can see that it increases by one each time the script would run.
  •           The CTS_CO field is the repeating field that I want the data to be stored in.
  •           The kf_CTS_ID field is the data that I want to store in the repeating field.  Each number I input is in this field at the time this script runs, so it should just pull from the table right into my repeating field (I would think).

     Side Note:  I also tried using a Commit Records command after this...I still haven't been able to tell through trial and error whether or not you need to Commit Records when using a global field, or whether you can just insert the data and it will stay until replaced by something else.  Thoughts?

     Let me know if this needs more clarification.  I tried to explain this complex issue as clearly and thoroughly as possible.  Thanks for any assistance!