Discussions

Expand all | Collapse all

populate user ID to a field

  • 1.  populate user ID to a field

    Bronze
    Contributor
    Posted 09-02-2017 10:39
    I need to be able to extract a user ID from a selected user.


    The process is as follows:

    When I select a user in a form, I would like to have a formula text field that populates the UserID from that user field.  I have read a similar article:

    https://community.quickbase.com/quickbase/topics/extract-user-id-from-a-user-name

    But i need a bit of help with the formula that needs to be inputted into the field.  Also, because its an API call, would I have to use a URL formula field and then run the script in that way?

    If I can just get all the user information into a field, I can then run the following formula in another field: Left(Right([User Field],"<"),">") to extract the ID only

    Please can someone assist with the format of the API call formula: API_GetUserInfo


    Thanks


  • 2.  RE: populate user ID to a field

    Bronze
    Contributor
    Posted 09-03-2017 18:49
    I read the post and do not like the native way. I would suggest the api call. You'll need the users email so could just have a field on the form. You'll need to implement the IOL technique if you have already. Feel free to contact me if you need coding help. Chuck@chuck.support


  • 3.  RE: populate user ID to a field

    Top
    Contributor
    Posted 09-03-2017 21:05
    > ... do not like the native way. ... You'll need to implement the IOL technique


    ">https://d2r1vs3d9006ap.cloudfront.net/s3_images/1645004/RackMultipart20170903-82274-1ca197w-goofus_inline.gif?1504472602">

    Goofus employs the IOL, BOL and SW techniques with QuickBase to achieve the impossible.


    ">https://d2r1vs3d9006ap.cloudfront.net/s3_images/1645006/RackMultipart20170903-93399-xzekn5-gallant_inline.gif?1504472641">

    Gallant uses only native QuickBase features and waits for proper releases.


  • 4.  RE: populate user ID to a field

    Posted 04-09-2019 17:47
    Hi Chuck. I've implemented the IOL technique, but I'm struggling to do the rest. In a form, when a user dropdown changes, I want to run  API_GetUserInfo for the user chosen in the dropdown and then populate a field of the form with the user's userID. Any suggestions would be greatly appreciated.


  • 5.  RE: populate user ID to a field

    Silver
    Contributor
    Posted 04-09-2019 18:27
    What would you use the ID# for, out of interest?


  • 6.  RE: populate user ID to a field

    Posted 04-09-2019 18:51
    I have an app in which I've added @mycompany.com as a user - granting all registered users of my firm basic access to the app, which includes access to a profile table. Users can create a profile for themselves and in so doing identify the role the user should have in the app.

    Once the form is populated, a formula URL field button will appear. The button will use the API_AddUsertoRole call.

    So to answer your question, I want to use the userID within the API_AddUserToRole call. 

    Make sense? Happy to discuss! I'm eager for any assistance.