Due to the fact that your user is using a web browser, IWP does not support script triggers except those triggered by another script. (A script that changes layouts will cause an OnLayoutLoad trigger to "fire", for example.)
If this is a single value checkbox field, you can set up the field as a button that performs your script. (The script will need to set the check box field's value first, then do the rest of what you want.)
If you have multiple values listed in your checkbox field, you can place transparent rectangles over each value shown on the layout and set them up as buttons in similar fashion, but they's set the field to different values.
Going forward, I understand the need to test my scripts to make sure they will function in IWP.
Seeing that the client has updated literally 1,000s of records now, is there an automated way for me to go through FMP and "reselect" all of the check boxes that were selected which would fire the script trigger and update the other tables / fields? My initial thoughts were that I could just use the Field Content Command (Command =) to take care of the issue, but just copying a 1 into the field won't fire the trigger either.
At this point I'm trying to avoid having to go back record by record and reselect the check boxes in order to fire the script trigger.
As a one time fix...
From within filemaker, you can find the records and then update the necessary fields with a Replace Field Contents command. Read up on this option in help. Make a back up copy first and don't do it when other users might be accessing the same records from their computer.
As you will see above, that's what I was trying to do, but unfortunately I cannot get a script to trigger unless I physically place a "1" in the field.
I'm not describing a script.
What I'm describing is a one time "fix" you'd do manually.
Just make a script that loops through your records and sets RFQ::Field_1C to itself. That will trigger the script (in FMP, not IWP).
As Phil said, this is a one-time fix. Moving forward, you'll need to use buttons in IWP since data-entry triggers don't work.
I like that suggestion even better as you already have that script or one very close to it that you can put into the looping script.
Fitch and Phil, thank you for your responses.
If possible, can you provide an example of "a script that loops through the records and sets RFQ::Field_1C to itself"? I'm new to FMP and newer still to scripting.
Thank you for you time and responses.
Go to Layout [RFQ]
Show All Records
Go to Record [first]
If [RFQ::Field_1C = 1]
Set Field [Table2::Field_2A; RFQ::Field_1A]
Set Field [Table2::Field_2A; ""]
Go To Record [next ; exit after last]
My original suggestion would have been:
make a back up copy of the file
Go to a layout based on RFQ that also has the Table2::Field_2A field on it. (Make one if you don't have one.)
Place the cursor in Table2::Field_2A
Select Replace Field Contents from the Records menu
Select the by calculation option and enter: IF ( RFQ::Field_1C = 1 ; RFQ::Field_1A ; "" )
Perform the Replace and then inspect the results.
Note, don't use replace field contents under circumstances when others might be modifying the same records. You might have to run this in the evening after hours or on a copy you've taken down off the server.
If you put a Freeze Window step before the loop it goes much faster.
You guys rock. I'll be trying this right now!!