Trying to evaluate if related records have specific dropdown value

I have some checkbox fields in the Opportunities module, and a one-to-many relationship (many Contracts per Opportunity).

Contracts have a dropdown contract_category_c with the following simple values;
Phase1
Phase2
Phase3
Phase Final
I have a checkbox for each of these, with the intention of being able to report when any of these is True.

I've started with the following formula; 

equal(related($contracts,"contract_category_c"),"Phase1")


that works, however one issue is since it's a one-to-many relationship (many Contracts per Opportunity), this formula only checks the first related Contract it finds. If that one doesn't match "Phase1", the checkbox will stay false—even if another does match, as it doesn't iterate through all of the related Contracts.

Somebody else suggested this formula

greaterThan(rollupConditionalSum($contracts,"contract_category_c","Phase1", 1), 0)

no errors, but none of the checkboxes are being ticked.

Any ideas to get this to work would be very appreciated.

Parents
  • Hi Tony,

    I have a suggestion that might help streamline your process. Have you considered using SugarBPM to handle updates when the Contract Category field changes on any related Contract record? With the right BPM configuration, you can automatically update the associated checkbox fields on the Opportunity record.

    I've attached a few screenshots that demonstrate how to detect changes to the Contract Category field in ANY RELATED Contract record.

    This approach eliminates the need to use calculated values for the checkbox fields and gives you more flexibility for future changes.

    Feel free to explore the training instance I used to test this out: https://icy-foliage-510.training.sugarcrm.com
    (Note: This instance will expire on August 16, 2025.)

    The process is titled "Update Opportunity Checkboxes with Contract Category field changes" if you'd like to take a closer look.

    Best regards,
    Andrea

Reply
  • Hi Tony,

    I have a suggestion that might help streamline your process. Have you considered using SugarBPM to handle updates when the Contract Category field changes on any related Contract record? With the right BPM configuration, you can automatically update the associated checkbox fields on the Opportunity record.

    I've attached a few screenshots that demonstrate how to detect changes to the Contract Category field in ANY RELATED Contract record.

    This approach eliminates the need to use calculated values for the checkbox fields and gives you more flexibility for future changes.

    Feel free to explore the training instance I used to test this out: https://icy-foliage-510.training.sugarcrm.com
    (Note: This instance will expire on August 16, 2025.)

    The process is titled "Update Opportunity Checkboxes with Contract Category field changes" if you'd like to take a closer look.

    Best regards,
    Andrea

Children