Jump to content

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

Recommended Posts

Posted

I was debating whether to post this in the Emailing forum or here, but it made more sense from a Define Fields point of view...

I have a database that consists of multiple related line items. Each of these line items will eventually get plugged into an HTML table as a table row. Using SMTPit, I then use one giant calculation field that combines a bunch of global text fields containing "raw" HTML and calculation fields that convert the data fields to HTML format. The result is a beautiful email.

From a FM point of view, I'm looking to make a calc field in my parent database that concatenates related calc fields.

For example, imagine these to be the calc field results in 3 related records:

="row_1"

="row_2"

="row_3"

In my parent database, I need this to show up as literally:

="row_1

row_2

row_3"

Posted

I'm wondering if my email script shouldn't just run a loop script that dumps these calc field values into a global. I know that can be done, I'm just wondering if there's a more straight-forward way of doing it.

Posted

A couple of ways of doing it.

1. Create a valuelist using the same relationship as the portal, and using the field you want to concatenate. Then use the valuelistitems function to get the list. The drawback is that the list won't include duplicates, and it will be sorted alphabetically.

2. Do a Go To Related Record[show] in the related file, and then go to a layout with the required fields, and do a copy all records. Then paste into your concatenation field.

Posted

Neither of those methods will work for me. The value list method forces alphabetical order and the "copy all records" method copies fields in the order they were created (hardly suitable when I NEVER look at the creation order of fields, or anything for that matter).

I think I'll stay in the parent database and run a script that inserts text into my global field from portal rows.

Posted

MDLarson said:

the "copy all records" method copies fields in the order they were created

If the GTRR use your portal relationship, then usually, you should get the records sorted according to your portal sort definition. If not, you may run a Sort script prior to the Copy All Records.

This topic is 7640 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.