Formula user field conditional statement

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
I'm trying to make a field called Approver Name for a table containing employee time cards. Approvers may be responsible for one or more employees. I want to use a Formula - User field to return the corresponding Approver for the employee creating a new time card (current user). I've tried If[Resource]=ToUser("employee email address"), ToUser("approver email address"), to no avail.
Photo of Caroline

Caroline

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of Xavier Fan

Xavier Fan, Champion

  • 410 Points 250 badge 2x thumb
More details please:

So [Approver Name] is the Formula - User field?
What field type is [Resource]?  In order to compare with ToUser("employee email address") - [Resource] would need to be a User.  

So each timecard has a [Resource] set, and you want the [Approver Name] to display the corresponding Approver User

Do you have a separate Employees table?  If so - that may be another way to retrieve the Approver.
Photo of Caroline

Caroline

  • 0 Points
I actually figured it out-- Resource is the user that will be entering the time card via a custom module (not the QuickBase table itself), so I ended up having to write the formulas as

If([Resource]= ToUser("employee 1 email address") or [Resource]= ToUser("employee 2 email address"), "Approver Name")
Photo of Xavier Fan

Xavier Fan, Champion

  • 410 Points 250 badge 2x thumb
Great - glad you got it working.