Creating a workforce assignment from Link, Work order ID is not populating

789
5
Jump to solution
08-25-2023 08:08 AM
LindseyGreidanus
New Contributor III

I have been working on a model to construct a link to open up a new assignment with assignment details filled in. This documentation - https://doc.arcgis.com/en/workforce/android-phone/help/deploy.htm#ESRI_SECTION1_107B8C0704544D6BA013... seems to indicate this is possible, but the parameter workorderid does not seem to work. 

I have gotten description, assignee and assignment type to all fill in according to my URL parameters, but the workorderid field does not populate. 

I have tried the following, where description fills out the text box with the word 'picture' but the Work Order ID text box is empty.

http://<portalURL>/apps/workforce/projects/<projectID>/dispatch/assignments/new?workorderid=123&desc...

I also tried out variations of workorderid like 'work_order_id'

 

 I am not sure if this is a bug or if workorderid is just not meant to be populated with a link. 

Thanks

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
JoshuaClifford1
Esri Contributor

Hi @LindseyGreidanus ,

Thank you for your feedback! There was unfortunately a typo in the documentation for the casing of this parameter, which is why it wasn't working for you. It should be workOrderId. The documentation has since been updated to include this correction: Open the Workforce web app from a link

Thank you,

Josh

 

View solution in original post

5 Replies
SarahRijneke
Occasional Contributor

Are you trying to populate the new point with the workorderid of the point that is clicked on?  I've linked workforce to Survey123 where the user is able to open survey123 from the workforce app and the URL looks something like this:

https://survey123.arcgis.app?itemID=******&field:work_order_id=${assignment.workorderid}

Where work_order_id is the name of the question in survey123 that will be populated and ${assignment.workorderid} is how you access the workorderid field from the assignment feature class.

 

What's your use case? Perhaps there's another way to accomplish what you're trying to achieve.

0 Kudos
LindseyGreidanus
New Contributor III

No, I am trying to populate the Work Order ID box by manually adding the Work Order ID into the text of the link, like the documentation indicates you should be able to do. 

Eventually, the plan is to have this built into a model, but at the time being I can't get a stand alone link to populate that field, and I am not sure why, when other fields are populating fine. 

The end use case is making it easier to create new assignments from a selection of features on ArcPro, because most of the information to populate the assignment already exists or there is a default value for most of the fields. I have tried a different approach of appending selected features to the workforce layer with the correct fields, but was running into different issues with that method as well. 

0 Kudos
SarahRijneke
Occasional Contributor

Have you tried putting the value that you want to see in the workorderid field in quotes (i.e. /dispatch/assignments/new?workorderid='123')? The workorderid field is a text field. Perhaps you need to specify that the value going in is a string.

0 Kudos
LindseyGreidanus
New Contributor III

Just tried that now, and no luck. 

The description would also be a text string, and it populates the field without quotes around the word.

Example link -> /new?workorderid=123&description=picture

Thanks for the suggestion though!

0 Kudos
JoshuaClifford1
Esri Contributor

Hi @LindseyGreidanus ,

Thank you for your feedback! There was unfortunately a typo in the documentation for the casing of this parameter, which is why it wasn't working for you. It should be workOrderId. The documentation has since been updated to include this correction: Open the Workforce web app from a link

Thank you,

Josh