May 15, 200916 yr A couple of variable questions: 1: I am trying to build a running list of actions completed by the user in a variable that will later be inserted into an email. I have a variable pulling data, but how do I "stack" the data? I have a loop built, but it seems to be overwriting not adding. the variable is $mfgrel_list the line in the loop is: set variable [$mfgrel_list; value:$mfgrel_list & ¶ The hope was that it would append the data by grabbing the existing variable data first, then adding the current record data to it. 2: What is the best way to view this variable in a layout? I would like to have a "status" window that displays this stacked variable data to the user as they are working. I placed it in a text within a merge field, and also tried a text field with a calculation to the variable, but neither worked. thanks,
May 15, 200916 yr That is almost correct. set variable [$mfgrel_list; value:$mfgrel_list & ¶ & YourField ] To view the variable data, you can set the value into a field ( global field if you want to see the same across all records )
May 15, 200916 yr Author I have placed the variable in a text field via auto-enter, but nothing shows. I have the Data Viewer up and it is writing the data to the variable, but the field is empty. What did I do wrong? thanks
May 15, 200916 yr How would the auto-enter work in this case? It all depends on when the action is taking place. You should just set the field after your loop is done with a Set Field [ YourField; $mfgrel_list ]
May 15, 200916 yr Author well, (my error) the auto-enter didn't work because I was using the wrong thing. thanks for the fix. OK, now the data is showing, but back to question one. It is not adding to the variable, it is overwriting it with the new data. How do I get it to add or stack data?
May 15, 200916 yr I thought I already responded to that... You script should look something like this. Loop Set Variable [ $mfgrel_list; value:$mfgrel_list & ¶ & YourField ] Go to Record [ Next; Exit after last ] End Loop Set Field [ YourField; $mfgrel_list ]
May 15, 200916 yr Author Got it. I had it set up as a global variable ($$xxxx) so it would last from step to step, but when I called for it in the stack step, it was calling a simple variable ($xxxx). Thanks so much for your help. have a great weekend.
Create an account or sign in to comment