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.

Scripting from Radio Button Selection

Featured Replies

I am very new to this so please bear with me! I am trying to create a script that will function in different ways depending on the selection made in a field containing radio buttons.

I have a field 'Consent' in which you can select either Yes or No. What i would like to do is if 'yes' is selected have the script take the user to a different layout within the database. If 'no' is selected i would like it to remian on the same layout and display a message. Is this possible and if so how? I know this is probably simple but i am new to scripting!

Thankyou in anticipation

Hi Anna,

Check out the Show Message script step. For an example of how this can work,

Show Message at: http://www.fmfiles.com/tnt8.html

Lee

smile.gif

Hi Anna

try with

If (RadioField ="Yes")

Go to Layout [Other]

Else

Show Message (You haven't chosen Yes ...)

End If

You might also add an If () at the beginning to check for an empty RadioField, should this imply a different action

  • Author

Hi,

Thankyou for your help. I have tried the above but i still canot get the script to run. Is it true that i have to have buttons to attach the script to or can it run simply from the 'Consent' Text field i have formatted for radio buttons? I know this may sound stupid but i haven't ever worked with Filemaker before.

Thanks,

Anna

Hi:

you can place a transparent button over each selection (yes and no, in this case) and assign it a script. For example, you would have 2 scripts - I'll call them YesButton and NoButton.

YesButton script:

Set Field [radio button field, "Yes"]

Go to Layout [whatever]

--or whatever you want it to do--

NoButton script:

Set Field [radio button field, "No"]

Show Message [whatever]

--or whatever you want it to do--

place these buttons over the yes and no in the radio button field and set them to transparent.

oh yea, don't forget to uncheck "allow entry into field" option.

Ken

  • Author

Thankyou so much! It works! Just a question though for future reference, is it essential that when you want to run a script it be attached to a button?

Thanks again!

Anna

There are plug-ins that allow for script execution upon exiting a field, but this is not native to FM.

  • Author

Thank you! I'm sure i will be calling on your help again in the near future!

Anna

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.