August 24, 201213 yr Newbies I am VERY new to filemaker pro v11 [or any version for that matter]; I just began using it to manage data for a non-profit group. I am trying to write a script [assuming that is the correct way to go about it] that will be based off of one data field. When "yes" is selected from the first data field's value list, i want four other data fields to either all read "N/A," which is also an option in the value list, to disappear, or something to that effect... however, I have yet to write any code and my own attempts continue to fail so far! I suppose a third option could be that the other four fields are already hidden and only appear when "no" is selected. Any help would be MUCH appreciated!!! ps. I'm also unsure as to when / how to run the script... i know that one can set them to run when the layout loads; is that the way to do it? much thanks...
August 25, 201213 yr Script: If[FirstDataField = "yes"] Set Field [field2; "N/A"] Set Field [field3; "N/A"] Set Field [field4; "N/A"] Set Field [field5; "N/A"] end if Attach a script trigger set to OnObjectModify to FirstDataField, and use it to call the script. To have the fields appear on a No answer: You must have a field ID with an autoentered serial number. Create a new field kAnswerNo (calculation, = "No" (or "no" depending on how your value list is set up). Create a new TO of your table and relate it to the original table by OrigTable::kAnswerNo = NewTO::FirstDataField OrigTable::ID = NewTO::ID Add a portal to NewTO on your layout, and populate it with NewTO::Field2, NewTO::Field3..., NewTO::Field5 Now the fields in the portal will only be displayed if FirstDataField contains "No".
August 25, 201213 yr Author Newbies Thank you SO MUCH! I was at such a loss but I just did all of that and it works perfectly.
August 25, 201213 yr What do you want to have happen if the first field changes to NO at a later time?
Create an account or sign in to comment