Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Newbies

Can anyone troubleshoot this Script?

I want to merge all the rows of portals into one field, ending automatically when I get to the last row. I can't seem to figure out how to get out of the loop.

Script

Go to Record/Request/Page [first]

Loop

Go to Portal Row [first]

Set Field [field 1:file B]

Loop

Copy [select entire contents]

Go to Field [field merged:file A]

Paste

Go to Portal Row [next, exit after last]

End Loop

Go to Record/Request/Page [next, exit after last]

End Loop

Thanks in advance.

Steve

quote:

Originally posted by sjhendee:

Can anyone troubleshoot this Script?

I want to merge all the rows of portals into one field, ending automatically when I get to the last row. I can't seem to figure out how to get out of the loop.

I will not try to troubleshoot the script, but offer what is probably a better solution.

Keep the outer loop, which goes through the records in your main file. Use the "Goto Record [Next, Exit After Last]" step to get out of the loop at the end.

Within the loop use a "Go To Related Record [PortalRelationship, Show Only Related Records]" step to goto the second file and get a set of only the related records (i.e. those that are in the portal).

Then use the "Perform Script [External, External Script]" to run another looping script in your sub-file. This loop will simply build all of your related data into a single global field.

Then use the "Set Field [RelationshipToMainFile::MergedField = GlobalMergeField]" to put the merged data back into the record in the main file.

This scenario seems more complicated on the surface, but will be much easier to work with in the long run and solves your problem very well.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

  • Author
  • Newbies

Thanks for the reply. Most of the script is now working, it is more complicated but functions alot better than my way.

I am having difficulty though getting the "Merged" field to match the "Global Merged" field. The Merged field is leaving out the last record that shows in the "Global Merged" field when I pause the script.

Any help is appreciated.

Steve

quote:

Originally posted by sjhendee:

Thanks for the reply. Most of the script is now working, it is more complicated but functions alot better than my way.

I am having difficulty though getting the "Merged" field to match the "Global Merged" field. The Merged field is leaving out the last record that shows in the "Global Merged" field when I pause the script.

Sorry, my example was poorly structured. Assuming that you have a relationship to the main file by MainRecordID or something.

SetField [Mainfile by MainRecordID::MergedPortal Data, GlobalMergedData]

So basically you are setting the MergedPortalData field in the main record equal to the GlobalMergedData field that you filled in the secondary file. The relationship is the normal Child-Parent relationship that is the same as the Parent-Child relationship from the Mainfile. You dfo not use the merged data in building the realtionships.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

  • Author
  • Newbies

Thanks, it worked. I appreciate your help.

Steve

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.