0

I need help please,

I created two fields, the first is "Group" of text type and the second is "status" of formula type

The status must check the condition of If Group contains '9','MIN','TER', 'CLO', 'closed', then the "status" field is inactive else active

Taking into consideration that this update should not impact all accounts. Only for users of the "App" application who have profiles starting with "App"

==> the formula :

IF( BEGINS( $Profile.Name, "App" ),
  Group__c = "9" , "MIN" ,"TER" , "CLO" , "closed" ,"inactif", "actif")

my question is how to correct my formula so that it respects the condition

1 Answer 1

0

You have to use AND() condition and OR() condition to verify in If and based on the output you should assign the Active or Inactive. Can you try using the below formula.

IF(AND( BEGINS( $Profile.Name, 'App' ),OR(Group__c = '9' ,Group__c='MIN',Group__c='TER',Group__c='CLO', Group__c='Closed')
),'inactive','Active')

Go through the Trialhead for more details on the Salesforce Formulas

8
  • thank you for your help Commented Mar 3, 2022 at 10:08
  • when i used your formula , the syntax was correct , but i always have just the value Inactive even if i give to the Group another value . Commented Mar 3, 2022 at 10:23
  • Are you trying to update the group__c value other than above values? Commented Mar 3, 2022 at 10:25
  • Now when I put in group_c another value apart from what exists in the condition, the status always remains the same, normally it should change to Active but I always have Inactive Commented Mar 3, 2022 at 10:30
  • I don't see any issue with the formula in my org. Can you try removing the first profile condition and check .. IF(AND( or(Group__c = '9' ,Group__c='MIN',Group__c='TER',Group__c='CLO', Group__c='Closed') ),'inactive','Active') Commented Mar 3, 2022 at 10:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .