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.

Value List script not working

Featured Replies

There is a way to select a value from a value list and activate a script from the selection. My problem is that currently this is not working for me. I have done this before but for some reason my value list is not working correctly. The [text field] "payment_type" is linked to the [valuelist] "payment_type" and I have specified the field to perform my script. In the [valuelist] "payment_type" is a listing of values: CASH, DEBIT, VISA, MASTERCARD, DISCOVER and OTHER. I have two other fields that are involved in this script. [number_field] "payment" and [number_field] "credit_card"

Below is how I have my script written.

Go to Field "payment_type"

if ["payment_type = "VISA"]

Set Field [ Credit Card, Payment * .03]

Else

if ["payment_type = "CASH"]

Set Field [ Credit Card, 0]

Else

if ["payment_type = "DEBIT"]

Set Field [ Credit Card, 0]

Else

if ["payment_type = "AMEX"]

Set Field [ Credit Card, Payment * .03]

End If

End If

End If

End If

When I click on the [text_field] payment_type I get a message "This field is Not Modifiable". After I click on the OK, then the Value List shows up. I select the name "CASH" but the script does not activate. What am I doing wrong?

First of all, let's clean up the script. Instead of all the "if" statements, try this:

SetField(CreditCard)

Case(payment_type="VISA", Payment * .03,

payment_type="CASH", 0,

payment_type="DEBIT", 0,

payment_type="AMEX", Payment * .03)

Now you only have one SetField command.

My guess is that the error message you get has to do with the script saying GoToField. I'd add a Pause step after GoToField, then attach the script to the field in the Format:Button menu. That way, you'll get the popup list for the field, select the value you want, then you'll have to continue the script, but it'll work.

  • Author

Thanks Dan, it worked perfectly. I appreciate you letting me know how to clean up my script.

That's why I get the big bucks.

Um ... you all can stop laughing now.

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.