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.

How to pass a parameter between two scripts

Featured Replies

Hello,

My question is quite simple: I have a script in the Client database that create a new memo in another database. So, this script calls a sub-script from the Memo database. How can I pass the ClientID from the first script to the second one?

Thanks in advance (and sorry for my poor English),

Pierre

You can set a global in either the Client db or the Memo one, and reference it in the sub-script either by its name (if it lives in the Memo file) or any relationship to the Client file (if it lives in the Client one).

To accomplish this I've created a generic relationship between the Memo file and the client by defining a calculation: c=1 in both files. Then you can create the relationship from the Memo file back to the Client a grab the global Client ID create a new record, and populate the foreign key in the new Memo record with the Client ID. Probably many ways to do this but this works for me. Best. K

You can use any relationship to the Client file; it need not even be valid at the time of use.

You can also use a technique like this one to avoid setting a global to hold the data altogether.

  • Author

Thanks for your help. So, I managed to do it with the following script... and after having marked "Allow creation of related records" in the relationship between the client table and the memo table:

WriteNewMemo

Go to Field [Memo::Memo_Date]

# There is a portal listing the memos in the client layout:

Go to Portal Memo [Last, Select entire contents]

Set Field [Memo::Memo_Date, Today]

Go to Related Record [Memo]

Perform Script [Filename:"Memo.fp5", "NewMemo"] [sub-scripts]

Best regards,

Pierre

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.