Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script to set poop-up in a portal to yes???

Featured Replies

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

Change the script from set field[related field, "yes"] to Replace [related field, "yes"]

Dj

  • 2 weeks later...
  • Author

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?

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

  • Author

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

Seems to me the script should run from within the related file.

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

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.