Select to view content in your preferred language

Change Job Name using Extended Properties

714
2
Jump to solution
12-04-2023 09:26 AM
AlyssaWood
New Contributor II

I'm trying to change the job name for a Workflow job based on information that a user puts in to the extended properties table. I know that I can add an arcade expression to take care of it for me, but I just can't figure out what expression to use. 

I also tried to put the expression into an update job properties step (jobs.job_name with an arcade expression: "jobExtendedProperty($job, 'serviceorder', 'so_num')") then just made the job name field not visible, however, when I tried to create a new job to test it, I got an error saying 'Unable to update properties. Not all properties were valid.'

I want them to be able to put in the service order number in a field labeled for that and it also be the job name.

I'm new to workflow and not very familiar with Arcade yet, so I'm learning a lot of this as I go, any help and advice adding to this is helpful.

0 Kudos
1 Solution

Accepted Solutions
SamWest1
Esri Contributor

Hi Alyssa,

Could you provide a little more information about your environment, and a step by step of your workflow?  I'd recommend testing your expression evaluates to what you expect in the Evaluate Arcade Expression section of the diagram page.

I gave your workflow a go with a 1-1 table with an integer field named like yours below:

SamWest1_1-1701814428879.png

And then configured the job properties updates with a similar Arcade expression. 

SamWest1_0-1701813170062.png

This was setup with just a manual step before and after so I could observe the updates.

SamWest1_2-1701814616123.png

The job tile does not automatically refresh the name in this instance, so you may need to hit the refresh button in the job details panel or run your search again to see the updated job name. If you are combining the number with text such as 'ParcelEdits_', you may need to modify your expression like so


'ParcelEdits_' + jobExtendedProperty($job, 'serviceorder', 'so_num')

 

This results in a job name like this:

SamWest1_3-1701814816282.png

Hopefully this helps!

View solution in original post

2 Replies
SamWest1
Esri Contributor

Hi Alyssa,

Could you provide a little more information about your environment, and a step by step of your workflow?  I'd recommend testing your expression evaluates to what you expect in the Evaluate Arcade Expression section of the diagram page.

I gave your workflow a go with a 1-1 table with an integer field named like yours below:

SamWest1_1-1701814428879.png

And then configured the job properties updates with a similar Arcade expression. 

SamWest1_0-1701813170062.png

This was setup with just a manual step before and after so I could observe the updates.

SamWest1_2-1701814616123.png

The job tile does not automatically refresh the name in this instance, so you may need to hit the refresh button in the job details panel or run your search again to see the updated job name. If you are combining the number with text such as 'ParcelEdits_', you may need to modify your expression like so


'ParcelEdits_' + jobExtendedProperty($job, 'serviceorder', 'so_num')

 

This results in a job name like this:

SamWest1_3-1701814816282.png

Hopefully this helps!

AlyssaWood
New Contributor II

That worked! Thank you so much. I'm not sure why it wasn't working before cause it seems like I had it in the correct place. I did not have the field as an integer before, but after discovering I can leave it as just numbers, I changed it so maybe it was a combination of a few things. Thank you. I just wanted the managers who are keeping track of work to be able to search the jobs using the Service Order number and I figured the easiest way was by putting it in the name, but I also wanted it to be tracked in its own table..

 

All that to say thanks for your help!