Create formula User field using another user field

  • 0
  • 1
  • Question
  • Updated 11 months ago
  • Answered
Hello. 

I have an analyst field-user and leadership field-formula user. All users are QB users.

For Leadership field, I created a formula to say something along the lines of
If ([Analyst]=ToUser("analyst#1 email address"), "supervisor#1 email address",[Analyst]=ToUser("analyst#2 email address"), "supervisor#2 email address")

However this formula did not work... Does anyone have any idea how to make this work?

Thank you in advance!
Photo of Neve

Neve

  • 260 Points 250 badge 2x thumb

Posted 11 months ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
why not just do

UserToEmail([Analyst])
Photo of Neve

Neve

  • 260 Points 250 badge 2x thumb
You mean something like
If (UserListToEmails([Analyst])="analyst #1 email address", "supervisor#1 email",
UserListToEmails([Analyst])="analyst #2 email address", "supervisor #2 email")
???

When I tried this, it gave me an error.
"The types of the arguments or the number of arguments supplied do not meet the requirements of the function UserListToEmails.

The function is defined to be UserListToEmails (UserList ul)."
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
I don't think I read your question carefully enough.

I think you want to hard code the leadership Userid by formula.

If (
[Analyst]=ToUser("analyst#1 email address"), ToUser("supervisor#1 email address"),[Analyst]=ToUser("analyst#2 email address"), ToUser("supervisor#2 email address"))
Photo of Neve

Neve

  • 260 Points 250 badge 2x thumb
Actually I figured out another way for this issue. 

But thank you for your help!
Photo of Neve

Neve

  • 260 Points 250 badge 2x thumb
When I tried my original formula, it did not work as it came back as a text value in a user field