Action button - configure - dependent on dropdown = no or blank

Hi all

Hoping this is a simple one for the experts!

My aim is to have an Action button appear if the dropdown = No or blank

I have tried a number of different variations, (blank, null, space) but cannot make the button appear 

this is a new dropdown so 99% of the records will have blank

I have tried using the "or" function but I get syntax errors (this is likely how I am writing the forumla)

  • Hi Taufique,

    Can you replace the formula as mentioned equal($pr_informal_extension_c, "No") and check how it goes?

    Thanks and Regards,

    PK,

    www.bhea.com

  • Thank you for the reply Slight smile

    Unfortunately, this update did not work

      

    To confirm the dropdown is brand new, 99% of records in Sugar the value saved would be blank

    I was hoping the formula would be able to determine if the field is empty?

    Thanks again

  • potentially I could use a NOT function

    Something like this (currently getting errors on this)

    not(equal($pr_informal_extension_c, "Yes")

  • This has worked

    not(equal($pr_informal_extension_c, "Yes"))

  • Hi Taufique,

    You have mentioned that (this is a new dropdown so 99% of the records will have blank) - blank or empty is not equal to No, that is the reason this formula equal($pr_informal_extension_c, "No") did not work for the records which are having as empty. You have used the same formula with opposite conditions. In your latest formula, you are saying not equal to Yes which includes both Null, Empty, and No values. This is the reason it worked.

    Hope this information helps :)

    Thanks and Regards,

    PK,

    www.bhea.com

  • Thank you Slight smile

    For future reference

    Would you know how would I create the formula to 

    Equal

    No or Null or Empty or No Values

  • Hi All

    Thanks for all the help

    If possible for one more question

    I have been asked for this button to have 1 additional criteria, the related Opp is a renewal (we have a custom checkbox "pr_renewal" that identifies this)

    I have tried a few variations of the formula but this is not working 


    not(equal($pr_informal_extension_c, "Yes")) and related($opportunities, "pr_renewal", "equals", "true"))

  • With a helping hand from ChatGPT

    The correct formula is

    and(not(equal($pr_informal_extension_c, "Yes")), equal(related($opportunities, "pr_renewal"), "true"))

  • Hi ,

    One thing to be aware of when using a 'related' formula on a one-to-many relationship like accounts-to-opportunities is that you cannot predict which opportunity it is going to retrieve the value from. If you have multiple opportunities related to an account and it is possible that the pr_renewal field will have different values across those opportunities, then this formula will produce unexpected results.

    A more sound solution in this scenario is to have a BPM definition push a value up to a field on the parent account when there is a pr_renewal opportunity opened, and then base your Sugar Logic formula off that field. 

    Chris

  • Thank you, understood Slight smile

    Luckily in this example, its a one relationship (a vehicle only has 1 related opp)