Skip to main content
Question

Filtering User List Formulas

  • January 2, 2021
  • 0 replies
  • 80 views

Forum|alt.badge.img+2
Hi! I am trying to find a way to filter a user list.

Fields:
User (single user field)
User-List (multiple users field)
Filtered User-List (multiple users field)

Example:
User has:
U1

User-List has:
U1;U2;U3

Goal:
Filtered User-List has:
U2;U3

Problem:
I've tried stuff like
ToUserList(
Left([User-List],[User])
Right([User-List],[User])
)

But User-Lists don't have the same rules as normal text fields and therefor I can't modify them like I would a text field. I also can't figure out a way to turn them into text fields, filter them, and then back into QuickBase Users. (If that's even possible).

Any thoughts on how to filter these User-Lists in the way I presented above?

------------------------------
Rosson Long
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • January 2, 2021
try this

var user UserField = [User]; // set the user field
var userlist MyUserlist = [Userlist]; // set the Userlist field

ToUserList(
If(ToUser(Part(ToText($MyUserlist),1,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),1,";"))),
If(ToUser(Part(ToText($MyUserlist),2,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),2,";"))),
If(ToUser(Part(ToText($MyUserlist),3,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),3,";"))),
If(ToUser(Part(ToText($MyUserlist),4,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),4,";"))),
If(ToUser(Part(ToText($MyUserlist),5,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),5,";"))),
If(ToUser(Part(ToText($MyUserlist),6,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),6,";"))),
If(ToUser(Part(ToText($MyUserlist),7,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),7,";"))),
If(ToUser(Part(ToText($MyUserlist),8,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),8,";"))),
If(ToUser(Part(ToText($MyUserlist),9,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),9,";"))),
If(ToUser(Part(ToText($MyUserlist),10,";")) <> $UserField, ToUser(Part(ToText($MyUserlist),10,";")))
)

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------