Forum Discussion

AnneMartin's avatar
AnneMartin
Qrew Trainee
2 years ago

Formula Query touserlist error

I'm sure this is a simple mistake, but I'm getting a "expecting user/userlist but found textlist" error.
Isn't this the function of touserlist? Field 29 is a user field.


//list all installers scheduled on this date
//table ID: _DBID_SCHEDULE, FID 29 = installer, FID 6 = date

var text myquery= "{6.EX.'"&[Date]&"'}";

touserlist(
GetFieldValues(GetRecords($myquery,[_DBID_SCHEDULE]),29))

------------------------------
Anne Martin
------------------------------

16 Replies

  • MarkShnier__You's avatar
    MarkShnier__You
    Qrew #1 Challenger
    OK, so not tested but I think you need to do this.

    //list all installers scheduled on this date
    //table ID: _DBID_SCHEDULE, FID 29 = installer, FID 6 = date

    var text myquery= "{6.EX.'"&[Date]&"'}";


    var text AllUsers = 
    ToText(
    GetFieldValues(GetRecords($myquery,[_DBID_SCHEDULE]),29)));


    var user UserOne= ToUser(Trim(Part($AllUsers,1,";")));
    var user UserTwo = ToUser(Trim(Part($AllUsers,2,";")));
    var user UserThree= ToUser(Trim(Part($AllUsers,3,";")));

    etc

    var user UserTwenty= ToUser(Trim(Part($AllUsers,20,";")));


    ToUserList($UserOne, $UserTwo, $UserThree .... etc up to say $UserTwenty)






    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • AnneMartin's avatar
      AnneMartin
      Qrew Trainee
      That doesn't give any errors, but is returning a blank value.
      Should the $myquery variable be a date type?

      ------------------------------
      Anne Martin
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew #1 Challenger
        Can you make a formula text field with just this formula and see and post back here what it returns?  Let's see what's in your data.

        ToText(
        GetFieldValues(GetRecords($myquery,[_DBID_SCHEDULE]),29)))

        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------