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.

Trouble with Pause/Resume script

Featured Replies

I am having trouble with the following script:

I am on Invoice layout and have a button “New Customer” with script that should do the following:

- Open a new window based on Customers table

- The user creates a new record (new customer) enters data

- The user clicks on a “Close” button on this “New Customer" layout to close it. The user is allowed to close the “New Customer” window only if Name and PhoneNbr fields are not empty.

What I have so far is:

New Window [Name: “New Customer”; etc…]

Go To Layout [“New Customer”, etc…]

Pause/Resume (Indefinitely) ------> (to allow the user to enter data)

::) -------> I don’t know what should come next

:???

I couldn’t find a Resume script that would allow me to proceed as follows:

If [not isempty(Customers:Name) and not isempty(Customers::PhoneNbr]

Resume Script step

Close Window

and attach it to the Close button on the “New Customer” layout

What script should I attach to the button on the Invoice layout?

What script should I attach to the button on the New Customer layout

If you have the Status Area in view mode there will be a "Continue" button shown. You click that button to continue the script. If you prefer you can add a button on your layout to continue the script as well.

Btw, your script:

If [not isempty(Customers:Name) and not isempty(Customers::PhoneN br]
will only work if both fields are empty not if either field is empty. Perhaps you want 2 separate If statements or a case statement.

If(not isempty(Customers:Name)

Show Custom Dialog(Customer Name Field is Empty)

Pause/Resume Script

Endif

If(not isempty(Customers:PhoneN br)

Show Custom Dialog (Customer Phone Field is Empty)

Pause/Resume Script

Endif

I guess you could also use If (not isempty(Customers:Name)) OR If(not isempty(Customers::PhoneN br))

**Just as a disclaimer - I always have to putz with my scripts to get them right! :) ***

HTH

Hi,

A button may have several options ( Pause, Resume, Exit , Halt )

Make sure the correct option is selected if you want the script to proceed.

You have several options. My favorite is to use a sub-script ExitScript [parameter] that would give the main script a scriptResult, which is the parameter entered, which would be your validation calc.

Then Get ( ScriptResult ) would therefore, as it says, be used by the "first" script to either proceed or not

HTH, not sure I'm very clear :)

  • Author

It took me time to understand the subscript thing; I got it working and problem solved.

Thanks guys.

It took me time to understand the subscript thing

Congrats,

re-reading my answer, it's still unclear to me what I've been writing :)

Ugo wrote: "re-reading my answer, it's still unclear to me what I've been writing"

I'm going to wait for Soren's reply. :)

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.