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 trigger a script upon data entry?

Featured Replies

This should be a quickie... If a user selects a choice from a value list, how can I trigger a script to run based on the user's choice? Much thanks!

-Scott

You must have a separate button to run the script. If you attach a script to a pop-up list or any datafield the first thing that happens when you click on it is that the script is executed. This precludes the possiblity of selecting a value first and then executing the script associated with the selected value. What you can do is have the script button execute a script that interrogates the contents of the datafield and then perform a subscript based on the value of the contents. i.e. let's say you have a datafield called Field1 that is formatted as radio buttons and the value list connected to the field has values ONE, TWO, THREE, FOUR.

You can change the contents of the datafield by clicking on one of the values that in the field. When you click on the script button it will execute a script, lets call it Fred. Fred looks like this

If (Field1 = "ONE")

Perform Script(sub-scripts,"Show One")

Else

If (Field1 = "TWO")

Perform Script(Sub-scripts,"Show Two")

Else

If (Field1 = "THREE")

Perform(sub-scripts,"Show Three")

Else

If (Field1 = "FOUR")

Perform Script(subscripts,"Show Four")

Else

Show Message ("Nothing Selected")

End if

End if

End if

End if

Each subscript would do whatever you wanted it to do for the associated value in Field1.

If you attach the script to the datafield you will never be able to change the value in the datafield before executing the script.

The Mad Jammer

You may want to play with some plug-ins now with version 7, or use some other ways...

Here's an alternative using a repeating field to mimic a value list and JM. Osborne Visibility technique.

It has a 250+ Value list which obviously isn't a reasonable solution, but working with a 10-15 items would be easy I'd think.

ClickAndGo.zip

You don't need a separate button. The first part of your script merely needs to go to the field and pause. On Windows, make the field a menu and attach a script like

Allow User Abort [Off]

Go to Field [yourfield]

Pause/Resume Script [0]

If [yourfield = 1]

Perform Script [One]

Else If ...

End If

For Mac, the solution is similar, but requires using a list, a loop and an Exit Loop If [not IsEmpty(yourfield)] step.

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.