April 24, 20196 yr Good afternoon, I am trying to create a script that performs a find, gets the found count number. Let's say 20 records are found. And then performs a loop through each record, gathering the data from 3 fields and setting variables, IE record 1 effective date field, variable $effdate1, record 2 $effdate2, etc and then puts all of this information into a body of an email. I'm trying to list out all 20 of these records line by line in an email with the 3 fields of data. Example: Record 1: Field 1, Field 2, Field 3 Record 2: Field 1, Field 2, Field 3. What is the best script or function to list out all the variables, when the number of variables is unknown. IE depending on the found count, the body text will change. Any help would be greatly appreciated. Thank you
April 24, 20196 yr If after performing the find you do: Go to Record/Request/Page [ First ] Loop Set Variable [ $body; Value:List ( $body ; YourTable::Field1 & ", " & YourTable::Field2 & ", " & YourTable::Field3 ) ] Go to Record/Request/Page [ Next; Exit after last ] End Loop you will end up with the $body variable containing a list with a line for each record in the found set, where each line contains the contents of the three fields, separated by a comma.
Create an account or sign in to comment