You requirment is bef'r clicking on the yes/no field it must be gray and after clicking no color is in this field ok
So you just condition formating on that radio button set that if empty then color otherwise no color.
Then in your script just add some more things that when no button is clicked then the next field is locked.
I appreciate the help but im still lost. I want the option for field 2 to be greyed out before any option... To make it simple... That field needs to be locked. Only way it opens if you hit yes on field one to the yes or no bullet. How do i do this?
Turning it Grey won't lock the field in FileMaker. You can, however, apply a conditional format to show it as grey and then use a script attached to a script trigger to move the cursor on to the next field in the tab order to "lock" the field.
If [YourTable::yourfield = "no"]
Go To Next Field
is all that's needed for the script trigger's script. (Use OnObjectEnter)
Right click the field while in layout mode and select conditional format. Use the same expression: YourTable::yourfield = "no" and you can specify a grey text and/or fill color to grey out the field.
Thats what i have setup as of now... I can careless about the grey part i just dont want data to be entered into that field if no is selected. Thats why im saying i wanted it locked with the color grey to show the users that data cant be entered.
You have the script with script trigger setup?
That's what is supposed to keep users from entering the field if the value "no" was selected in your field. As you said, the grey color conditional format is just a visual cue to the user.
Is there a way in the script to have the field locked prior ? So in the scipt i can put... If field medicaid = yes go to next field and have it unlock?
I don't see the logic to that. If the yes/no field = "no" the field is locked. If you change it back to "yes" the script does nothing and the field is accessible.
Medicaid: Yes or No <If yes move to next field and unlock to select choice otherwise go to next field. Type of Mediaid would not be in tab order.
Type of Medicaid ( Drop Down List) <----- This field locked until above is set to yes.
This is what im trying to do.
And that's what this script handles except that you've now specified that it not be in the tab order.
Set up this script with the OnObjectExit script trigger for the medicaid field:
If [YourTable:Medicaid = "Yes"]
Go To Field [//specify the drop down list field]
Exit Script [false]
Keep the other triggered script set on the drop down list with OnObjectEnter as it's the simplest way to control access to the drop down list field should the user click on the field.
on the type of medicaid field... what do i put on that for a script?
What i did so far... I have on yes or no box the scipt you told me to... It then goes down to next field which is type of medicaid however, if a user selects no at top... they still have the option to select the type of medicaid... This is what i dont want so what kind of script do i put on type of medicaid?
You said that you'd removed that field from the tab order. If it's not in the tab order, the only access to the field is with a mouse click (or via a script, but we don't have that here).
This is the script that is supposed to deny access if you click on the field:
If [YourTable:Medicaid = "no"]
Go To Next Field
This should kick the user out of the field if you've entered "no" for the medicaid field.