0

I am looking for some help with a formula. I am trying to display a hyperlink to users based on the obj status and add another condition based on user profile. So far the formula works:

CASE (TEXT (Status),

"In Progress", HYPERLINK("Hyperlink example","Edit Record", "_blank"),

"Complete", HYPERLINK("Hyperlink example","Edit Record", "_blank"),

"Referred T", HYPERLINK("Hyperlink example","Edit Record", "_blank"),

"Referred TM", HYPERLINK("Hyperlink example","Edit Record", "_blank"),

"Referral Approved", HYPERLINK("Hyperlink example","Edit Record", "_blank"),

"Referred U", HYPERLINK("Hyperlink Example","Edit Record", "_blank"),

"Unable to edit record"
)

However for the last value, I need to add a condition to only display based on profile id. This formula works on it's own:

IF (ISPICKVAL( Status , "Referred U") && $User.ProfileId = 'add id', HYPERLINK("hyperlink example","Edit Record", "_blank"), "User unable to edit record"
)

How can I merge these together? Any ideas please?

1 Answer 1

0

Try this,

CASE (TEXT (Status),
    
    "In Progress", HYPERLINK("Hyperlink example","Edit Record", "_blank"),
    
    "Complete", HYPERLINK("Hyperlink example","Edit Record", "_blank"),
    
    "Referred T", HYPERLINK("Hyperlink example","Edit Record", "_blank"),
    
    "Referred TM", HYPERLINK("Hyperlink example","Edit Record", "_blank"),
    
    "Referral Approved", HYPERLINK("Hyperlink example","Edit Record", "_blank"),
    
    "Referred U", IF (ISPICKVAL( Status , "Referred U") && $User.ProfileId = 'add id', HYPERLINK("hyperlink example","Edit Record", "_blank"), "User unable to edit record"),
    
    "Unable to edit record"
    )
1
  • better: $Profile.Name (at least for mono-language orgs)
    – cropredy
    Commented Feb 2, 2021 at 0:59

You must log in to answer this question.

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