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

Filtering a value list based on entries in a portal


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

Recommended Posts

Posted

Hi all,

I apologize of this is in the wrong forum (I could not tell whether it belonged in portals or value-lists).

I have a simple database with three tables:

ActorsTable (ActorID, ActorName)

JoinTable (ActorID, SkitID)

SkitTable (SkitID, SkitName) with a Portal (JoinTable::ActorID)(ActorsTable::ActorName)

I am using a value-list based on the fields ActorID and ActorName (from the ActorsTable), to add the actors to the portal on the skit table.

The problem I have is that I can add an actor multiple times in the portal.

Is there some way to filter a value-list to exclude actors that have already been added to the portal (but will not remove them from the value-list for other records)?

Thanks in advance

Posted

Make another occurance of your actorstable, set the relationship between actorID in the new actors table occurance and ActorID in the join table as not equal to. Then pull the value list from your second actors table. Im just head theorizing here.

Also, Im not sure the value list will refresh until you've commited your changes to the file, i.e. clicked out of the portal. One work around for this is to not allow creation through your portal and script record creation in the related table instead.

~Genx

Posted

-snip-

Also, Im not sure the value list will refresh until you've commited your changes to the file, i.e. clicked out of the portal. One work around for this is to not allow creation through your portal and script record creation in the related table instead.

~Genx

It sounds like this might be the way to go, but I have never done much with scripting, so I'm not sure how to begin.

Posted

One way would just be store skitid in a variable, go to a layout tied to your join table TO, create a new record and set the skitid = the variable i.e:

Allow User Abort [Off]

Freeze window

SetVar[$SkidID ; SkitTable::SkitID]

Go to Layout [Any Layout tied to JoinTable]

New Record/Request

SetField[JoinTable::SkitID ; $SkidID]

Commit Record

Go to Layout [original layout]

Option 2: Make a new timestamp field in your join table, and a new calc field with result timestamp in your skit table (with equation Get(currenthosttimestamp) ). Next, create another join TO and join it to skit by relating skitid to skitid and the calc field to the time stamp field. Double click on the relationship between your new join table and your skit table, and allow creation of records on the join table side. Finally, you just use a mini script to generate the record:

Setfield[JoinTable2::SkitID ; SkitTable::SkitID]

Commit Record

Refresh Window

~Genx

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