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

Confirm all instances in portal meet a status


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

Recommended Posts

Posted

I'm creating a text field which will generate a text flag via calculation that indicates all of the line items in my portal meet a certain criteria, (ie. "complete" status of related purchase order records from my related purchase orders database). I tried the following calculation but it is generating the text flag if ANY of the items meet the criteria rather than if ALL meet the criteria:

Case(PurchaseOrders::POStatus = "Complete", "All outstanding PO's are completed")

What can I change in my calculation, or what other approach can I use?

Thanks!

Posted

Hi Jana,

I think your calculation will actually generate the text flag if the FIRST related record meets the criteria.

To achieve your goal you can take (at least) two approaches:

- either loop through all related records in the portal and as soon as you find one that does NOT meet the criteria RESET the flag,

- or make a calculated field in the related file witha value of 1 (one) if the criteria for that record is met. Then make a calculation (either scripted or a calculation field) in your main file with the following definition:

Case(Sum(PurchaseOrders::POStatusFlag) = Count(PurchaseOrders::SomeField), All outstanding PO's are completed")

In other words: if the sum of all purchase orders which are completed equals the total of all related records then all outstanding PO's are completed.

Hope this helps,

Ernst

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