Jump to content
Sign in to follow this  
FM::Student

Field as a "summary" of related fields

Recommended Posts

Hi,

I've run into what seems like a fairly straight-forwards problem but I can't figure it out.

I have my principal record "table1" with my related "table2". "table2" takes "table1"'s primary key.

I have a field in table 2 called status that can be set to "Open" or "Closed". I also have a status in table1 that can be "Open" , "Closed" or "Started". The way I want it to work is:

-If there are no related records in table 2: status = "Started"

-If there are "closed" and "open" related records in table2: status = "Open"

-If there are only "closed" related records in table 2: status = "closed"

I've been trying to figure out a calculation but I don't know where to start.

Share this post


Link to post
Share on other sites

Try:


Case (

IsEmpty ( Child::ParentID ) ; "Started" ;

IsEmpty ( FilterValues ( "Open" ; List ( Child::Status ) ) ) ; "Closed" ; 

"Open"

)

(I have renamed your tables to Parent and Child.)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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