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.

Pause Resume Script Step and Getting Current ID on Resume

Featured Replies

Hey Everyone, I've been doing a lot of Pause/Resume script steps in a solution and I've got somewhat of a hack for the task I'm trying to accomplish, but I'm wondering/betting there is a simpler solution. 

 

For example, the work flow works something like this. There are Three tables Invoice, InvoiceItems, and Products.

 

The user is looking at the Invoice Layout and adds a InvoiceItem. Then, they need to pick a reference Product. From this point, I have a button on the InvoiceItem record that says "Add Product". I run a script that shows another "pop-up" window with a List View of Products with pictures. The Script is Paused. Each record has a button that says "Select". Once the user presses the button select, the window will close and the the Product ID is linked to the InvoiceItem.

 

The trick is to get the Product ID before the pop-up closes and save it to a variable. When I have the "Select" Button with script Step Resume Script it doesn't seem to enter/access the listed record I am selecting and therefore when I try to set variable ProductID = $ProductID...$ProductID is empty or the wrong one. I have a few hacks to work around this by splitting the script into two scripts, but I'm not totally happy with the solution and I'd prefer to keep it all in the same script.

 

Any ideas?

 

Thanks!

Each record has a button that says "Select".

 

And what is the action assigned to that button? If it's Resume Script, and if your script does:

...
Pause Script
Set Variable [ $productID ; Products::ProductID ]
Close Window [ Current Window ]
...

then you should be fine.

I've never liked Pause/Resume but used it because there was not better alternative...until Modal Windows! I suggest switching to making a New Window[] that can't be navigated away from and two scripts, one to start, one to end.

  • 2 weeks later...
  • Author

I've never liked Pause/Resume but used it because there was not better alternative...until Modal Windows! I suggest switching to making a New Window[] that can't be navigated away from and two scripts, one to start, one to end.

 

That's exactly my current solution! A modal pop-up. I was trying to keep it all in once script for ease of management of local variables.

 

I main issue was when starting the routine, I press a button from the parent record, I need to capture the parent record ID. The script ends. So I need to store the ID in a global variable or global field somewhere. This way, when I "resume"  I can inject the parent record ID back into the new related records that the user is creating. I just need to be careful to clear out the global variable/field when I finish the script. There are some other issues, but I've got a nice working solution and the clients are happy.

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.