jace.pro icon indicating copy to clipboard operation
jace.pro copied to clipboard

What is SUBQUERY

Open jacebenson opened this issue 4 years ago • 1 comments

What is SUBQUERY

SUBQUERY is an undocumented close relative of RLQUERY - an encoded query keyword that lets one do joins in... encoded queries I'm sure you have read about RLQUERY in docs page Encoded query strings.

For those interested, an example of SUBQUERY can be found in Relationship Related Tasks of Interaction [interaction]. RLQUERY is powerful I use reports UI just to access it in a gui I feel like a demo is needed as … joins is something i just keep poking at until i get it working

Thank you pok

jacebenson avatar Sep 13 '21 18:09 jacebenson

All in all, the encoded query for a glide_list field pointing to sys_user would like like this: javascript: 'SUBQUERYsys_id,user,sys_user_grmember^groupIN' + [array of group sys_ids] + '^EQ^ENDSUBQUERY^active=true^EQ'

SUBQUERYsys_id,user,sys_user_grmember

means INNER JOIN sys_user_grmember M ON M.user = <sys_user>.sys_id

groupIN' + [array of group sys_ids] + '

means WHERE M.group IN (...)

active=true

means <sys_user>.active = true

jacebenson avatar Sep 13 '21 18:09 jacebenson