Skip 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.

Script inconsistent -- workout improvement

Featured Replies

I was trying to modify the duplicate portal records of a found set of the original records themselves + the duplicates to distinquish between each other.

I couldn't get the next record, exit after last function to work properly and came up this work around. (see attached)

Does anybody see how this script can be improved?

Script_question.pdf

Edited by Guest

That script looks like it may work... I didn't test it but I would suggest actually going to the related records and duplicating them there. The loop you would have to make would be much simpler. Duplicating in portals is definitely not the ideal way of handling this situation. Here is what this script would look like:

GTRR

loop

go to record first

duplicate

//set fields you want to set here

omit record

go to record first

omit record

end loop

This is slightly better but still not ideal. The best way of handling this problem is to create a parameterized create record script. Now your script is much easier to write(and read);)

go to record first

loop

perfrom new script

go to record next, exit after last

end loop

The parameterized script is a little more difficult to tackle but would be worth it in the long run... There are lots of posts around here that would help you with that if you aren't already familiar.

  • Author

Thanks as always -- the script was for use after getting the related records ... I will explore:)

I actually realized that a little earlier today... sorry my brain turns to mush at night.

Hope you don't mind, but the algoritm could be less clunky:

Sort Records [ Specified Sort Order: Untitled::Record; descending ] [ Restore; No dialog ] 

Go to Record/Request/Page [ Last ] 

Loop 

     Duplicate Record/Request 

     Go to Record/Request/Page [ Previous ] 

     Omit Multiple Records [ 2 ] [ No dialog ] 

     Exit Loop If [  not Get ( FoundCount ) ] 

End Loop 

Put inside the manditory GTRR and Go To Layout[orignal]

--sd

That is a cool way of doing it... my brain still can't loop backwards though. It definitely would work better. Thanks Soren.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.