Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Best way to move related records to a text field?


Recommended Posts

What is the best way to grab all the related records for one record and move that data into a global text field so I can parse the data and formate it?


I already have a script that sends an email of my invoices as a text email. I do this by pulling up the invoice record. Then a GTRR step (for line items) and moving to a special layout that shows only the fields I need in a list. I then use the copy all records script step. Then move to another layout that has a global text field and paste the data into it. Now I am able to parse the line items data and formate it. Then I use another global text field to create the text email invoice. Then send this to the email program.


What I want to change in this the copy all records step for the line items. This step overwrites all data on the clipboard. This is bad if a user has something already in the clipboard.


Does anyone know of a better way to do this?

Link to comment
Share on other sites

Create script:


Set Field[Global_Field,""]


Set Field[Global_Field,Global_Field&FIELD1&FELD2&FIELD3...Your FIELDS

Go to Rec[next, exit after last]


Link to comment
Share on other sites

Here oan old one I did for emailing but it will work just the same for your problem



Create a global field called Message_Calculator


Create a field called Multi_Emails= calc =


Name_Field & " "& Date_Field & "¶"

Telephone & " "& Email_Field & "¶" &

Address_field & " "& City_Field & " "& State_Field & " "& Zipcode_Field


( Or use Whatever fields you want to include in the email).


Store as text ,and in storage options choose Unstored. also in the calc place space in between the quotes that separate the field names. Each time you use one of these "¶" it will cause a line break. You can also add in the calc literals such as "Name: " or "date: " and so on as long as they are separted by a & or & "¶" &.


Now for a script

Find Muti_emails for today

(remember you can set you search anyway you want).


Enter Find Mode [ ]

Setfield (Date_Field (Today))

Perform find [ ]


Set Field ( Message_Calculator( Message_Calculator & "¶" & Muti_emails))

go to record request [next][exit after last]

end loop




Source post



Looks a little wierd since the new software in this forum , but you get the idea.

Link to comment
Share on other sites

What do you think is faster to grab those related records, the copy all records method I have done or loop through the records in your example?


I will try this out thanks

Link to comment
Share on other sites

The loop is intended to be done in a small found set....so by all means if you add a GTRR SRRO before ist will be faster.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

Terms of Use