Skip 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.

Use records from 1 table ---> update records in another

Featured Replies

So I have the following tables & fields:

user::memberID

roles::memberID, roles::year, roles::status

currentRoles::memberID, currentRoles::year, currentRoles::isParticipant, currentRoles::isStaff...

and the following relationships

roles::memberID = currentRoles::memberID

roles::year = currentRoles::year

So each user has a roles table for various years. Roles::status contains text, such as "Participant," or something else.

What I want to do is move all the roles information into the currentRoles table. Currently, a user will have multiple roles tables if they have multiple status' for the same year. So if a user has two roles tables with year=2006 for both, but status="Participant" and status="Staff," I want to make one currentRoles table with isParticipant="yes" and isStaff="yes."

I was able to create a script that made all the correct instances of the currentRoles table, but I am having trouble populating them with the right data.

Go to Layout ["roles", (roles)]

Show All Records

Go to Record/Request/Page [First]

Loop

  If [isEmpty (currentRoles::memberID) and isEmpty (currentRoles::year)]

    Set Field [currentRoles::memberID; roles::memberID]

    Set Field [currentRoles::year; roles::year]

  End If

  # not working vvv

  If [Exact (roles::Status ; "Participant")]

    Set Field [currentRoles::isParticipant; "yes"]

  End If

  If [Exact (roles::Status ; "Staff")]

    Set Field [currentRoles::isStaff; "yes"]

  End If

  # not working ^^^

  Go to Record/Request/Page [Next; Exit after last]

End Loop

The above script creates the correct number of tables, with the correct memberIDs and years, but it doesn't mark isParticipant and isStaff the right number of times.

Any ideas?

Edited by Guest
typos

It may just be typographical error, but both of your Ifs appear to be incorrect.

If [Exact[ roles::Status ; "Participant" )]

should be

If [Exact( roles::Status; "Participant" )]

and

If [Exact roles::Status; "Staff" )]

should be

If [Exact( roles::Status; "Staff" )]

  • Author

Yeah, those were just typos.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.