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

Purpose:  To capture the contents of a field before it is changed.  Compare the before to the after.  Highlight the after and screen capture then export.

 

I can't get past the first sentence and it's getting frustrating because it seems extremely simple.

 

1 Field:  OnDeck_t (text)  -  The OnDeck_t field data = On

2 Field:  OnDeck_before (Where I want to capture the OnDeck_t before it's changed)

 

I have an OnObjectEnter script trigger on the OnDeck_t field that runs this script:

Set Field By Name [substitute (Get (ActiveFieldName); "_t"; "_Before"); Get (ActiveFieldContents)]

 

If I do this it works fine.  (But I don't want it hard coded.  I will be using it for all the fields on the layout):

Set Field [OnDeck_before; Get (ActiveFieldContents)]

 

 

I have divided the Substitute (Get (ActiveFieldName); "_t"; "_Before") and Get (ActiveFieldContents) into separate lines in Data Viewer and both return expected results.  Why doesn't it work when it's part of a 'Set Field by Name' script step?

 

Thanks.

You should have your trigger create a variable, perhaps $before, that consists of the text before anything is typed.

  • Author

OK I created a script called "Before".

 

It has one step:

Set Variable [$before; Value: Get(ActiveFieldContents)]

 

There is an OnObjectEnter script trigger on the OnDeck_t field (On; Off Radio buttons) with the "Before" script set.

 

From what I understand, the "Before" script should run after I click into the OnDeck_t field, making it active.  The script should set the $before variable to 'On' which is it's current contents.

 

It doesn't work.  The variable is blank.

 

Any ideas?

$vars (local variables) only exist for the duration of the script and are lost once the script terminates - hence yours is blank

 

You need to use a $$var (global variable) - these remain in place until the file is closed.

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.