Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

New member, possibly naive question:

I have a families database for a small school. 2 tables: families, which contains parent contact information, and children, which contains child information, related to families by a unique index field (FamIndex.

Children has a field (for each child, obviosuly) called EnrollStatus which can have values 'inquiry', 'accepted', 'enrolled', 'alumni', 'declined,'etc. I would like a calculated field in parents which takes the values:

enrolled, if any of the associated children are enrolled,

alumni, if any of the children are alumni,

prospective, if any are inquiry or accepted,

declined, if none of the above are true and any children are declined.

I am using List and PatternCOunt like this:

Case(

PatternCount ( List ( children::EnrolStatusChild ); "enrolled")>0; "enrolled"; PatternCount(List(children::EnrolStatusChild ); "alumni")>0; "alumni";

(PatternCount ( List ( children::EnrolStatusChild ); "inquiry")>0

or

PatternCount ( List ( children::EnrolStatusChild ); "accepted")>0); "prospective";

PatternCount ( List ( children::EnrolStatusChild ); "declined")>0; "declined";

"other"

)

so I guess I have it figured out but it seems kind of inelegant.

Any thoughts?

Thanks,

Dave

Posted

How about:


Let ( childstat = List ( children::EnrolStatusChild );

      Case ( not IsEmpty ( FilterValues ( childstat; "enrolled" ) ); "enrolled"; 

             not IsEmpty ( FilterValues ( childstat; "alumni" ) ); "alumni";

             not IsEmpty ( FilterValues ( childstat; "accepted" ) ); "prospective";

             not IsEmpty ( FilterValues ( childstat; "declined" ) ); "declined";

             "other"

           )  

    )

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