Skip to main content
Question

Formula-User field that shows value of another Nonempty user field

  • November 18, 2019
  • 0 replies
  • 122 views

Forum|alt.badge.img+5
#field​ #Formulaandfunctions 
Hi. I have a formula user field FINAL USER that should show the User A if "User A" field is nonempty, else it should show User B, but if User B field is empty, it should show User C. If User C is empty, it should finally show User D. If I have this: If ( IsNull ([User A]), [User B],[User A]), then it works. However, I need to be able to have the conditions below in that FINAL USER field. Can you please help with the formula?


If(
IsNull([User A]), [User B],[User A],
IsNull([User B]), [User C],[User B],
IsNull([User C]), [User D],[User C]
)

​​​

------------------------------
Isabel Gumanid
------------------------------
This topic has been closed for replies.

  • Registered
  • November 18, 2019
Try this formula.  You may want to put  a default user at the end, in case [User D] is also blank.

If(
IsNull([User A]) = false, [User A],
IsNull([User B]) = false, [User B],
IsNull([User C]) = false, [User C],
IsNull([User D]) = false, [User D]
)

------------------------------
Xavier Fan
Quick Base Solution Provider
http://xavierfanconsulting.com/
------------------------------

  • Quickbase Staff
  • November 18, 2019
This version worked for me in a test app:
Case(not true,IsNull([User A]),[User A],IsNull([User B]),[User B],IsNull([User C]),[User C],[User D])

------------------------------
Eric Mohlman
------------------------------

  • Quickbase Staff
  • November 20, 2019
Isabel,

It looks like your response was sent privately, so others can't see the update. Here it is in case anyone wants the context:
 I forgot to mention which will only apply to User A. It should be "If User A is not empty and not equal to supervisor@gmail.com, then show User A". Any thoughts?​
To accomplish that, I would use this type of formula:
If(not IsNull([User A]) and UserToEmail([User A])<>"supervisor@gmail.com",[User A],Case(not true,IsNull([User B]),[User B],IsNull([User C]),[User C],[User D])

------------------------------
Eric Mohlman
------------------------------