Jump to content
Server Maintenance This Week. ×

Automated email based on number of accounts found


This topic is 1828 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

This topic is 1828 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.