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

The following script works in FMP 6 but not 7...its something simple but I just cant make it work. what am I missing?

There are two files. SR_Lead and SR_Contract the join is on Lead Number in both files. The script checks to see if I have aan existing contract record related to the lead record. If not it lets me build a new contract record if so it takes me to the existing contract record.

In Version 7 it is not doing the check for the existing SR_Contract record. The problem is likely in the If [Get (Last error)=101 ] statement but I can't figure out what is haywire

If you got an error the select window step is between the "gtrr" and the "if" thus the get(last error) would not show it.

You could use a global to store the error before selecting a window and use the global in the if.

You can also test for the existence of a related record instead of performing the step and retrieving the error.

If [not IsEmpty(SR_Contract Record::serial)]

Show Custom Dialog ["You can not create a new contract..."]

Else

Perform Script ["New Contract"]

End If

  • Author

...How do I store an error in a global? and once I have it how do I get the srcipt to act the way it is supposed to?

Also I tried this:

If [not IsEmpty(SR_Contract Record::serial)]

Show Custom Dialog ["You can not create a new contract..."]

Else

Perform Script ["New Contract"]

End If

and it didn't work....it is all there?

.How do I store an error in a global?

Well is it needed?? Hardly!!!! What I usually make a condition just before the GTRR to count the number of related records based on the newly entered key ...or as -Queue- suggest looks if a serialnumber is availiable ...if none exists perform the subscript.

So get rid of the line containing the Get(LastError) ...it's a waste of steps if measures exists to prevent the error in the first place.

--sd

Can you elaborate on "it didn't work"?

You will need to substitute your related unique ID field name for 'serial', in case this is your issue.

Those steps are merely the core of the idea. If you need to perform more steps after the Perform Script, then by all means, add them.

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.