'Required If' formula with 2 conditions - Multiple Statuses and Assigned User Attribute

Hi All,

May I please get some help on a 'Required if' formula on a field in the leads module. This is my first post on Sugar Club.

The requirement is setting a field to be required if the status is any of the following (23 different statuses) and the assigned user belongs to a specific business unit (SYCF). We are excluding 2 statuses 'New' and 'Unable to Contact'.

Was able to set the formula with one status and the business unit. But I'm unable to include multiple statuses in the condition.

The formula I have as of now using multiple statuses (testing with just a few as of now) is:

ifElse(and(or(equal($status,"Discussion"),equal($status,"Inspection"),equal($status,"Considering Offer"),equal($status,"Documents Requested")),equal(related($assigned_user_link,"business_unit_c"),"SYCF")),false,true)

Sugar accepts the formula but this field is now required regardless of the status or the users business unit > basically as if I only checked the box required on the field in studio.

Would truly appreciate some kind help with this. Sugar V12.0

Kind Regards,

Sheldon Pereira

Parents Reply Children
  • Hi  ,

    I tested in a stock instance of Sugar and the formula works as expected, so here is what I recommend checking:

    1. Go to Admin > Studio > Leads > Fields > Lead Status. Edit the dropdown list and ensure the key value (i.e. the value in brackets) is exactly what you have in your formula. The value is case-sensitive. The formula should not be using the display value. 
    2. Similarly for business_unit_c field in the Users module, check to make sure the value exactly matches (case-sensitive here too) whether that field is a dropdown or text field. 
    3. Since your screen is showing a new lead user creation, ensure the assigned to user on the lead is a user with the SYCF business unit. 

    If that doesn't help, please provide a screenshot of your current Lead Status dropdown list from Studio as well as the configuration (and if applicable, dropdown list) of the Business Unit field on the Users module.

    Chris