Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7859 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

This topic is 7859 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.