Skip to main content
Question

Compare record owner (as user list field) to text field

  • August 30, 2023
  • 0 replies
  • 187 views

Okay, this might be a bit complex, so let me lay out the issue. 

I have a text field called SME that is in the format of some guy (sg1234), another guy (ag2345).

First, I need to create a user list field from that SME text field.  I figure it's grabbing that sg1234 and appending the email suffix of @somecompany.com. 

Next, i want to see if the record owner for the record is in that user list field.  I know I'd  have to make the record owner (user) field into a user list field.  How would i accomplish the converting of the text field into a user list field?



------------------------------
MICHAEL SARGENT
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+9
  • Quickbase Alumni
  • August 31, 2023

If you want to do this with only one field, create a formula checkbox field: 

var userlist users = 
ToUserList(
ToUser(ToText([SME] & "@somecompany.com")),
[Record Owner]
);

Contains($users, [Record Owner])

If you want to do this with 2 separate fields: 

For the user list: 

Create a Formula - List - User field with the formula like this:

ToUserList(

//get user from [SME] field by appending with the company domain

ToUser(ToText([SME] & "@somecompany.com")),

//add record owner to user list

[Record Owner])

For checking to see if the record owner is present: 

Create a formula checkbox with the formula: 

Contains([User List Field], [Record Owner])



------------------------------
Katlyn Allen
kallen@eatatjacks.com
------------------------------