Forum Discussion

DawnRene3's avatar
DawnRene3
Qrew Trainee
7 months ago

Conditional formula url

I'm trying to build a conditional url formula where if a multiple choice field equals a certain person, display this url. Unfortunately, it's not pulling in anything. Here is my current syntax in the formula URL field:

If(ToText([Contractor Operations Manager])="Sally Struthers","https://calendly.com/sally.struthers") &
If(ToText([Contractor Operations Manager])="Fred Flinstone","https://calendly.com/fred-flinstone")

Any thoughts?

  • You need to see what the result is of 

    ToText([Contractor Operations Manager])

    I suspect that the field is a user type field so the totext result of that will be either their email address or the or their username if they have one.

    If indeed its a userid field, then you should chjnage it to this

    Case(UserToEmail([Contractor Operations Manager]),

    "struthers@mycompany.com","https://calendly.com/sally.struthers",

    "fflintstone@ompany.com","https://calendly.com/fred.flintstone")

     

    Having said that, it's not good practice to hard code this into a formula field as these people will change over time. It would be a lot better if you could have a table of operations managers and pull in a lookup of the calendy URL 

     

     

  • Try this. I also like to put the if statements on separate lines for cleanliness.

    If(

    ToText([Contractor Operations Manager])="Sally Struthers", "https://calendly.com/sally.struthers",

    ToText([Contractor Operations Manager])="Fred Flinstone", "https://calendly.com/fred-flinstone"

    )

  • You need to see what the result is of 

    ToText([Contractor Operations Manager])

    I suspect that the field is a user type field so the totext result of that will be either their email address or the or their username if they have one.

    If indeed its a userid field, then you should chjnage it to this

    Case(UserToEmail([Contractor Operations Manager]),

    "struthers@mycompany.com","https://calendly.com/sally.struthers",

    "fflintstone@ompany.com","https://calendly.com/fred.flintstone")

     

    Having said that, it's not good practice to hard code this into a formula field as these people will change over time. It would be a lot better if you could have a table of operations managers and pull in a lookup of the calendy URL 

     

     

    • DawnRene3's avatar
      DawnRene3
      Qrew Trainee

      You are correct, Mark - it was a user field and that solution worked perfectly. Thank you!!!