Forum Discussion

PeterKrasznekew's avatar
PeterKrasznekew
Qrew Trainee
3 years ago

Limit access to a formula URL button from a "List - User" field

Hello,

     I am trying to set up view restrictions for buttons based on the input of an assigned to field. I am able to get the formula to work for a single user field but I was wondering if it is possible to have that same functionality for a list-user field where more than one person might be assigned. Thank you.


If([Assign to 2]=User(),
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_18=In Progress" & "&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()))

------------------------------
Peter Krasznekewicz
------------------------------

5 Replies

  • Maybe what you want to use in the Includes function
    https://login.quickbase.com/db/6ewwzuuj?a=dr&rid=180&rl=djn

    If(
    Includes([My List User Field], ToUserList(User()),

    URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_18=In Progress" & "&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()))

    I believe that you need to convert the User() field to b a List User type for that function to work, hence the use of ToUserList(User())

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • PeterKrasznekew's avatar
      PeterKrasznekew
      Qrew Trainee
      Mark,

         Thanks for the help on this. So I created a new List - User field, however, when I go to input the "if" statement listed below I'm getting the error "Column: 0 > Expecting userlist but found text" at the end of the formula. Do I need to define the users beyond just adding the "User()" field?

      If(Includes([Assign to List], ToUserList(User()),
      URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_18=Completed" & "&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()))



      Thank you.

      ------------------------------
      Peter Krasznekewicz
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        What kind of field is [Assign to List]

        Sounds like this is just a down and dirty multiple-choice text field and of course QuickBase has no idea if you have a John Smith on the drop-down list which user that actually is.

        Can you have a [Assign to List] be a list user field type?


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