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.

Featured Replies

I have a field named "Databases" with the following values: "CORD", "SDHS", "Y Ballet". This field is displayed as a checkbox set. I recently learned that "CORD" should have been "DSA", so I naively changed "CORD" to "DSA" in the value list but then none of the records that were checked for "CORD" were checked for "DSA", which reminded me that the values in the value list are the values of the field Databases and not labels for checkboxes. I revised the value list to again include "CORD" and its checkbox is again checked for all the records for which it was originally checked.

I wrote a script, shown in one of the attachments, to insert "DSA" into the Databases field for each of the records that contains "CORD" in that field. When I run the script I get an error message saying "Databases" is defined to contain only specific values, and that I must enter a valid value. How can DSA not be a valid value when it is included in the value list for the field? How can I accomplish what I want to do?

Does programming scripts in FileMaker ever get easier? I don't write many scripts, but when I do I find it surprisingly difficult to accomplish what I think would be the simplest of tasks.

Thanks in advance for your help,

John Link

22598958_ValueList.png.515a59af957824c887db34e702700efe.pngScript.png.76a03749ce450b437e1e31c5a920294a.png22598958_ValueList.png.515a59af957824c887db34e702700efe.png361709511_Errormessage.png.fc0449bafc580c9f7d9598b942fb2673.png

Edited by John Link

If you want to know what's really happening, place another instance of the field on the layout and format it as an edit box. Then you will see that if the field has say CORD and SDHS checked, it contains:

CORD
SDHS 

Now, your script inserts the text "DSA" at the default insertion point, which is at the end of the field's data, resulting in:

CORD
SDHSDSA

and "SDHSDSA" is not in your value list.

 

Based on your description, I would expect to see an entirely different action:

Set Field [ YourTable::Databases; Substitute ( YourTable::Databases ; "CORD" ; "DSA" ) ]

 

Note also that your script is missing a Loop section. it will modify the first record (or at least try), move to the next record and stop.

 

Edited by comment

  • Author

Thank you, comment. Using Set Field worked. 

Create an account or sign in to comment

Important Information

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

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.