Select to view content in your preferred language

How to create version and also set the same version to the map?

72
2
Thursday
angiexx1
Emerging Contributor

I am trying to create a version automatically and i have to set the same version on the map, how do to that? i tried everything use the version name in the 'Set Job version' as 

jobOutputValue($job, '45e9adae-7c8c-4e64-9c3a-6ab4bxxx', 'version')  

Even then the error says no matching versions found, how to solve this?

0 Kudos
2 Replies
TiffanyWeintraub
Esri Contributor

Hello Angie,

If you are using the Create Version step template in your workflow to create the job version, you should be able to dynamically retrieve the job version name using the JobVersion(job_id, data_source_name).

Here is the link to the help page for the expression details:  https://doc.arcgis.com/en/workflow-manager/11.4/help/data-management-functions.htm#ESRI_SECTION1_0FA...

For the second part of your question: I am not sure how you are trying to open the map, but if it is done using the Open Web Page step, and it is opening something that has a URL parameter for the version, you can format the URL like the example below. It is a concatenation of string and Arcade so the formatting is key.

'https://servername.domain.com/portal/apps/mapviewer/index.html?webmap=2622e6b3d9e447af99429bcf3f173624&extent='+  jobLocation($job) + '&version=' + jobVersion($job,'data_source_name')

0 Kudos
angiexx1
Emerging Contributor

Hi Tiffany

I created the branch version via Workflow Manager but how to set that version in the map automatically is where i am stuck

0 Kudos