Hello,
I need help building a working QUERY expression to query specific records in the Inbox.
I want users to have access to records they created and to records in which their username where selected from a select_multiple question.
So the logic of the second part of the query is that the select_multiple question is called AllowedUsersInbox and it has my users usernames as choices. If the currently logged in user in S123 was selected in the select_multiple question of a record, he will have access to that record to edit via the inbox.
With the query in the screenshot I get an error message:
How can I make the query works?
Thanks a lot,
Jérémie
Solved! Go to Solution.
I managed to make my query works by reading this post:
I took screenshots of my query and xlsforms if you want to see the results:
Hi Jérémie
Try Creator=${username} or ${username} IN (AllowedUsersInbox)
The syntax of the IN clause requires a pair of brackets.
Hi!
Thank you I forgot the brackets!
The query now works when I select a single user but doesn't if I select more than one.
The output of my select_multiple question looks like this: John.Smith,Bob.Obama,William.Kurst
I think the usernames sould be separated by a space and put between '' for my query to works.
Is this right?
If yes, is there a function to do that or should I built a custum javascript function?
Thanks again!
I managed to make my query works by reading this post:
I took screenshots of my query and xlsforms if you want to see the results: