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

Value in a portal as trigger for a relationship


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

Recommended Posts

Posted

I have a list of values in a portal. What I am trying to achieve is that if a certain value appears in the portal, this can be used to trigger a relationship.

ie. A portal shows all the possible diagnoses a patient has. If one of these diagnoses is "rectal cancer", I wish to be able to recognise this in a calculation - something like Case(portal contains "rectal cancer", 1, ""). The problem I have is that this only works if the diagnosis "rectal cancer" is the first related value in the portal (as I understand it FileMaker only evaluates the first related record). To solve this I was thinking that if I had a field that became populated by all the values in the portal as a list, I could then use something like

Case(field based on portal="

Posted

You could use that algorithm if you first define a value list of the related diagnosis field. Then you can use the ValueListItems() function to list all the related diagnosis.

However, you might consider using another relationship to the diagnosis file based on a compound key of the PatientID and Diagnosis. The key in the parent file would be a calc: PatientID & " Rectal Cancer", the key in the Diagnosis file would be PatientID & " " & Diagnosis.

A relationship based on these keys will only show those diagnosis that are "Rectal Cancer". This can then be reliably used for your calcs or scripts.

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