Pass Workforce Assignment ID to Survey 123 Related Table

312
3
11-07-2023 06:37 AM
RobynSnookCCB
New Contributor III

Hello,

I have a survey created from an existing feature layer which has a related table. The survey is based off of the related table. In turn I've created a workforce project and linked assignments to this survey. I want the users to click on the assignment in workforce and then the 'survey at assignment' button.

However, the survey has multiple groups at do not apply to all assignment locations and I'd like to hide the ones that do not apply. I was thinking of using the pulldata function to pull in the workforce assignment ID and filtering groups that way but it isn't working. 

Is there anyway to filter groups based on a workforce field? 

0 Kudos
3 Replies
abureaux
MVP Regular Contributor

What you've described should work.

Assuming you fill in a field with a value, you can reference that field in either relevant or body::esri:visible columns.

abureaux_0-1699377215660.png

 

0 Kudos
RobynSnookCCB
New Contributor III

yes this is what I'd like to do but I can't get the workforce assignment ID to populate in my related table via pull data in order to apply it to the filter.

The workflow i'm after is:

1) user clicks on the assignment in workforce, then clicks on the 'survey at assignment'.

2) the workforce assignment ID is populated into a field in the table via pull data.

3) the groups are filtered based on ID found in step 2. 

This is what I've done can I cannot get it to work. Just keeps coming up empty in the survey.

RobynSnookCCB_0-1699377808443.png

 

0 Kudos
abureaux
MVP Regular Contributor

Ah. I'm not familiar with Workforce specifically, but if you are able to launch from there, you should be able to use a custom link (see Integrating with other Apps). This same process is discussed in a similar Workforce thread, so is should work.

Link would look something like this (note: replace blue text with your own stuff):
arcgis-survey123://?itemID=36ff9e8c13e042a58cfce4ad87f55d19&field:WFAssID={a_field_in_wf}

EDIT: I didn't specifically mention this, but using the above method would replace your pulldata(). Essentially, just delete the calculate from WFAssID, and leave it as a plain hidden text field. The URL will dump the value into the field. If you absolutely must use pulldata(), we can focus on that, but I think this will be a simpler solution given you are already launching from Workforce.

 

There is also a Workforce and Survey123 blog post that may be helpful if you haven't seen already. In my quick scan, I don't believe it discusses this specific task though.

0 Kudos