Skip to main content
Question

How to use a formula field to count number of users selected in a list user field?

  • January 28, 2015
  • 0 replies
  • 92 views

I'm trying to figure out if there is a way to count the number of users in a list user field to help calculate and determine a projected completion date based on the number of user assigned to a tasks and the total number of hours estimated for a job.

This topic has been closed for replies.

  • Registered
  • January 28, 2015
This is working for me--just replace [User List] with the field in question, and you'll need to add conditions for 6-10.

If(

not IsNull(ToUser(Part(ToText([User List]),5,";"))), 5,

not IsNull(ToUser(Part(ToText([User List]),4,";"))), 4,

not IsNull(ToUser(Part(ToText([User List]),3,";"))), 3,

not IsNull(ToUser(Part(ToText([User List]),2,";"))), 2,

not IsNull(ToUser(Part(ToText([User List]),1,";"))), 1

)

  • Author
  • Registered
  • January 28, 2015
That did it. Thank you for your help! Much appreciated!

Awesome, exactly what I was looking for. Thanks!

  • Quickbase Alumni
  • February 19, 2020

Also this formula would work, replace

    with the name of your list user field

var UserList myUserList =

    ;
    var Text users = SearchAndReplace(SearchAndReplace(Trim(ToText($myUserList))," ;", ";"),"; ",";");
    Count(
    Part($users,1,";"),
    Part($users,2,";"),
    Part($users,3,";"),
    Part($users,4,";"),
    Part($users,5,";"),
    Part($users,6,";"),
    Part($users,7,";"),
    Part($users,8,";"),
    Part($users,9,";"),
    Part($users,10,";"),
    Part($users,11,";"),
    Part($users,12,";"),
    Part($users,13,";"),
    Part($users,14,";"),
    Part($users,15,";"),
    Part($users,16,";"),
    Part($users,17,";"),
    Part($users,18,";"),
    Part($users,19,";"),
    Part($users,20,";")
    )