Query inbox for multiple users

598
2
Jump to solution
10-28-2020 05:17 AM
MikeFiguray
New Contributor III

Good morning,

We are using Survey123 to track job assignments for various crews. I am currently managing 10 separate forms for the various crews that use the system and we plan to expand that to more crews in the future. I was hoping to eliminate the need for multiple forms and only use 1 form in which the inbox would be filtered based on the crew that the work is assigned to. The catch is that in many cases there are multiple usernames that need to be associated with the crews. For example, Dave and Dan would need Blacktop assignments to show up in the inbox, but Ron Keith and Steve would need Concrete assignments etc...

Does anyone have any ideas on how I can do this? I've run into a wall with everything I've tried.

Thank you,

Mike

0 Kudos
1 Solution

Accepted Solutions
BarbaraWebster1
Esri Contributor

Hi Mike,

One option would be to create an assignment field containing the list of assigned usernames in the hosted feature layer associated with the survey.


You could use either of these expressions in the Inbox query:

POSITION(${username}, <FIELD>) > 0

<FIELD> LIKE CONCAT(CONCAT('%',${username}),'%')


For more information on these and other standardized SQL functions, see the Standardized SQL functions in ArcGIS Online documentation.

Thanks,
-Barbara

View solution in original post

2 Replies
BarbaraWebster1
Esri Contributor

Hi Mike,

One option would be to create an assignment field containing the list of assigned usernames in the hosted feature layer associated with the survey.


You could use either of these expressions in the Inbox query:

POSITION(${username}, <FIELD>) > 0

<FIELD> LIKE CONCAT(CONCAT('%',${username}),'%')


For more information on these and other standardized SQL functions, see the Standardized SQL functions in ArcGIS Online documentation.

Thanks,
-Barbara

MikeFiguray
New Contributor III

Thanks Barbara, that should work out well!

0 Kudos