Forum Discussion

PatrickDunn's avatar
PatrickDunn
Qrew Assistant Captain
7 years ago

IOL and UserID

Hello. I've added basic IOL functionality to an app, but I'm admittedly new to it. 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 tips would be greatly appreciated.

11 Replies

  • If your question above is related to how to write to a field with the retrieved User ID - You can append another GET request in your formula-url for an EditRecord call. Not sure if thats the desire - the above comments seem to be in a different direction. If thats the need though - you can take the formula I provided above and do something along the lines of:

    var text url = "https://yourrealm.quickbase.com/db/main?a=API_GetUserInfo&email=youremail";
    "javascript: { 
    $.get('" & $url & "', function(response, success) {
    var userId = response.getElementsByTagName('user')[0].getAttribute('id');
    $.get('https://yourrealm.quickbasae.com/db/tabledbid?a=API_EditRecord&apptoken=token&_fid_10=' + userId, function(response,success) { window.location.reload() })
    })}"

    where _fid_10 would be updated specific to the actual field ID you need to store the User ID value in.

    Chayce Duncan | Technical Lead
    (720) 739-1406 | chayceduncan@quandarycg.com
    Quandary Knowledge Base