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

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

Recommended Posts

Posted

I have a script that uses the set field command, that when executed, changes a field (formatted as a pop-up) to "Yes."

The problem is that the field is in a portal. The script works, but it will only change the first line of the portal. If the portal has entries in more than one line, it does not change the pop-up field to "Yes" in any other lines (related records) except the first.

Is there a way to get the script "set field" to change all the fields in the portal, no matter how many lines (records) there are?

LR

  • 2 weeks later...
Posted

The above suggestion works...but to a point. It not only changes the field in the record I am in, but it changes it in all the portals in all the records, not just the related one. Any suggestions?

Posted

But it's exactally what you have asked for

Is there a way to get the script "set field" to change all the fields in the portal, no matter how many lines (records) there are?

Dj

Posted

Sorry...sometimes it is hard trying to explain the specifics of a problem. I probably did not do a good job of stating it.

My main database has a portal that shows related records. One of the fields contained in the portal is a pop-up. I want a script that will change the field to "yes." The script I have been using only changes the field from the first line in the portal. If there are more than one record being displayed in the portal, I want the script to change the field from all of them to "yes."

The script needs to run on the current diplayed record, or in other words, change all the fields called "change me" in the related records being displayed in the portal from "no" to "yes."

LR

Posted

You can use a simple go to portal row - next step to loop through the portal rows.

Or use Go to related record - only show related records. then perform script (external) the external script is then a replace script in the related file that sets the field you want to Yes. (Or if you dont want the Replace dialogue to appear, use a looping script to set the field.)

Also remember to include at least one more script step in your first script, or Filemaker will end in the related file. A simple goto field, without seting a field works well. Also freeze the window at the start of the first script, this will speed things up and also stop unsightly screen jumps.

Rigsby

This topic is 8181 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.