Custom URL scheme from Workforce?

5321
17
02-27-2018 06:22 AM
by Anonymous User
Not applicable

I know you can call Survey123 from Collector or Navigator. Is it possible to launch a specific form from Workforce and pass information like the asset ID or any other relevant info I would want to carry over to Survey123? Say I want our mobile workers to receive assignations in Workforce (on their worker maps) and launch a specific form in Survey123 when they select a layer from the map inside Workforce. I know this method works quite well in Collector, but what about in Workforce? BTW -  Many thanks to Ismael Chivite and James Tedrick for their fantastic contents on GeoNet

17 Replies
PaulSweeney3
Occasional Contributor III

Thanks Jeff i think i will try it on a current project we have in operation, we currently use the workforce module to automate the creation of assignments and i was looking for away to improve the content of the survey123 form so it was great to stumble across this info. Thanks for your reply. 

0 Kudos
bgomes
by
New Contributor II

Hi Jeff,

Have some change in the structure of workforce?
Before we have the abitity to change scheme url of Survey 123 from Ago Assistant, but now the structure is quite different. I' cant see this option anymore.
have some way to choose our own fields to integrate in Survey 123?

Thanks

0 Kudos
by Anonymous User
Not applicable

In the offline Workforce Projects, the integrations are stored in a table within the feature service that is created. You can directly add new rows to add new integrations. More info can be found in this doc topic..

0 Kudos
BobZappitelli
New Contributor II

Aaron Pulver

Aaron, I'm using your workforce automation scripts to populate a project.

I'd like to add a custom field, in this case, 'hours', to assist with scheduling.

I've tried modifying the script to allow this (I've already added the field qtyhours to the layer), but am having little success.

I should add I'm not a coding expert but have some understanding.

# Set the hours
if args.qtyhours_field and assignment[args.qtyhours_field]:
assignment_to_add.qythours = assignment[args.qythours_field]

parser.add_argument('-qtyhours-field', dest='qtyhours_field', help="The field that contains the Hours")

The code executes, but does not collect the quantity of hours from the csv file.

0 Kudos
by Anonymous User
Not applicable

assignment_to_add.qythours = assignment[args.qythours_field]

I think this is the line that won't work. The "assignment_to_add" object is an Assignment and it only has specifically defined properties

If you want to do this, I think you'll have to go to the feature level like:

assignment_to_add.feature.attributes["qythours"] = assignment[args.qythours_field]

I haven't tried it, but I'm pretty sure it will work.

BobZappitelli
New Contributor II

Flawless.

Thanks Aaron!

0 Kudos
BobZappitelli
New Contributor II

Hi Aaron,


assignment_to_add.feature.attributes["qythours"] = assignment[args.qythours_field]


Is this still valid for a version 2 project?

Thanks.

0 Kudos
by Anonymous User
Not applicable

This should work for both classic and offline enabled projects.

0 Kudos