Integrating Workforce with Survey123 using layer popups

5220
26
11-27-2018 01:45 PM
AlexGerrish1
Occasional Contributor

We've successfully integrated Survey123 with Collector using custom URLs in popups but we are hitting a roadblock while integrating Survey123 with Workforce using the same method. In Workforce, the same URL will successfully download the target survey but none of the parameters therein are passed on.

I see that Workforce can integrate with both Collector and Survey123 at the assignment level but we've been unable to pass attributes from existing facilities, containers, buildings, etc. to the inspection form using this method.

The URL successfully passes all parameters and looks like this:

arcgis-survey123://?itemID=b4d070xxxxxxxxxx&field:WasteState={WasteState}&field:WasteStream={WasteStream}&field:saa_id={SAA_ID}&field:saa_building={Building}&field:saa_loc={SpecificLocation}

Do I have to adjust my syntax for this link to pass the parameters in Workforce or is there another step to do this?

0 Kudos
26 Replies
by Anonymous User
Not applicable

Unfortunately that's a current limitation of the web application; you'll have to do it programmatically. It is on our roadmap to accommodate extra fields. We also have plans to enhance the experience for configuring more advanced/custom integrations. 

AndrewHargreaves2
Deactivated User

Thanks Aaron Pulver‌ - do you have a tentative timeline?

0 Kudos
CraigGillgrass
Esri Regular Contributor

Hi Andrew, not at this time.  This ability hasn't been assigned to any of our upcoming releases.  There are a number of dependencies we need address or have addresses in the platform first.

Craig

AndrewHargreaves2
Deactivated User

Craig Gillgrass‌ / Aaron Pulver just for my own knowledge can you explain how the 'assignmentIntegrations' work? More specifically, I see that it's passing values to Survey123 using 

${assignment.latitude}

However, nowhere else in the JSON is 'assignment' set. So how does the app know what 'assignment' is? Can I use a similar trick to specify attributes from '${layername.attribute}' ?

"assignmentIntegrations": [
{
"id": "default-survey123",
"prompt": "Survey at Assignment",
"urlTemplate": "arcgis-survey123://?itemID=xxxxxxxxxxxxxxxxxxxxxxx&center=${assignment.latitude},${assignment.longitude}&field:FacilityID=${assignment.location}"
}
]

0 Kudos
by Anonymous User
Not applicable

Andrew,

Each assignmentIntegration contains a "urlTemplate". The url template may contain assignment fields. Each assignment integration acts on the active/selected assignment. So when a worker is looking at an assignment, the Android or iOS app will inject that assignments' value into the url template when it is displayed. Anything with ${} notation is a template what will be replaced (including the $,{, and } characters) with a value. Only assignments (not other layers) are supported.

0 Kudos
AndrewHargreaves2
Deactivated User

Hmmm...OK, so that's not an option for getting a features attributes into a survey. Instead, I've found a solution leveraging the ability of Survey123 for ArcGIS‌ to run a JS file, query for a particular feature (with the ID passed in from Workforce for ArcGIS‌) and return that feature's values as JSON which can be parsed and pushed into the survey. I discuss it in this post here.

0 Kudos
AlexGerrish1
Occasional Contributor

I should mention that I have been testing in iOS but we are primarily using Android devices for field inspections. It seems Workforce in Android does not recognize these custom pop-up configurations. The popup in my map displays the layer attributes in their default configuration even when I have a custom configuration set.

When can we expect a new version of Workforce? Is there a roadmap kept up anywhere publicly? Our field workers are anxious to start integrating this app.

0 Kudos
CraigGillgrass
Esri Regular Contributor

Alex,

Correct, this is a known issue in Android that we're working on resolving

When can we expect a new version of Workforce?

We're planning on the next version of Workforce towards the end of Q1, 2019.

Is there a roadmap kept up anywhere publicly?

We have a sneak peak section on our doc site: General FAQ—Workforce for ArcGIS | ArcGIS 

BrettHudson2
New Contributor

Any news on this upcoming update?

Thanks!

0 Kudos
CraigGillgrass
Esri Regular Contributor

Brett,

Unfortunately, this update has been delayed until later this year and will be included in the new release of Workforce that is targeting support for Offline.

Craig

0 Kudos