Formula

Hi

I am using an action button to speed up our sales team, I would like to be able to name the opportunity as part of the action button based on fields in the account, this is where I am at the moment:

equal( (related($accounts, "coefss_c", " ") "Review", related($accounts, "review_due_c" " "), 2024) I was hoping this would return this e.g,

COE Review Nov 2024

Any help much appreciated.

Joe 

Parents
  • Hi  ,

    The equal() formula in SugarLogic is a boolean formula which means it only returns a value of true or false. The formula you are seeking would be concat(). Your formula would look like this:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    concat(
    related(
    $accounts,
    "coefss_c"
    ),
    " Review ",
    related(
    $accounts,
    "review_due_c"
    ),
    " 2024"
    )
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Hardcoding a year in the formula may not produce the desired results. If your 'review_due_c' is a month dropdown and they select 'January', you may want that to say 'January 2025' (or whatever the next year is when this action is taken). If that's a potential use case, I recommend reviewing ways you could automate the year in that formula rather than hardcoding it. 

    Chris

  • HI Chris

    Thanks for taking the time to look at this for me, the formula above currently returns Review2024, the two related fields are dropdowns, but I am trying to get the displayed values from the individual accounts, is this why we are getting this return.

    joe 

  • Hi  ,

    If the result you are seeing 'Review2024' you will first want to double check the formula you entered. At a minimum, there should be spaces before and after 'Review' even if the related values are not populating. If you look at the formula I entered in my prior post, you will see there were spaces included in side the quotes for those two strings.

    As to why the the dropdown fields are not populating, I need additional information to help further:

    • What module is the action button placed on? 
    • Is the action of the button to create an opportunity or something else?

    Chris

  • HI Chris

    Thanks you were correct I missed the spaces.  The action button is on accounts to create an opportunity.

    Joe 

  • Hi  ,

    It looks like this is a bug in Sugar (90036). It also looks like someone recently had the same issue in SugarClub. That post describes a code-level way to achieve your outcome as well as a SugarBPM-driven way. 

    Whichever route you choose, I recommend filing a case with Sugar Support to let know you are impacted the defect I linked above so they can link you to the defect and update you on its progress.

    Chris

  • HI Chris

    Thanks for all your help, I have found a work around in that when the smart button is used to create an opportunity with a specified name a business process has been set up to rename the opportunity to the settings required.

    Joe 

Reply
  • HI Chris

    Thanks for all your help, I have found a work around in that when the smart button is used to create an opportunity with a specified name a business process has been set up to rename the opportunity to the settings required.

    Joe 

Children
No Data