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

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

Recommended Posts

Posted (edited)

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
Posted

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" )]

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