How can I query a field to be equal to the current user

  • 1
  • 2
  • Question
  • Updated 9 months ago
  • Answered
  • (Edited)
I want to query a field where assigned to is equal to the current user. like
API_DoQuery&query={12.EX.Current User}
any idea how I could achieve this?
Photo of Michael Curtis

Michael Curtis

  • 524 Points 500 badge 2x thumb

Posted 9 months ago

  • 1
  • 2
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,322 Points 20k badge 2x thumb
you use the placeholder value "_curuser_"

{12.EX._curuser_}
Photo of Michael Curtis

Michael Curtis

  • 524 Points 500 badge 2x thumb
Hmm. I'm using it on a code page and _curuser_ is not working
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,272 Points 20k badge 2x thumb
https://help.quickbase.com/api-guide/index.html#samplequeries.html

try the version in the example wtih TV (true value) and single quotes:

{'5'.TV.'_curuser_'}
 
Photo of Michael Curtis

Michael Curtis

  • 524 Points 500 badge 2x thumb
Very nice that worked thanks!
Photo of Michael Curtis

Michael Curtis

  • 524 Points 500 badge 2x thumb
For some reason, this is making me the current user even when someone is logged in. My goal is when the user logs into QuickBase my query string makes them the current user. "https://***.quickbase.com/db/bk*******kvs?a=API_DoQuery&query={'9'.TV.'_curuser_'}AND{12.XEX.Comple}...
(Edited)
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,272 Points 20k badge 2x thumb
If you are the one that is issuing that HTTP request, you are the one QuickBase considers to be logged in. Other users may also be logged in simultaneously but they are not the ones issuing that HTTP request.
Photo of Michael Curtis

Michael Curtis

  • 524 Points 500 badge 2x thumb
Ahhh! know of any fix?