Tasks: Additional Actions fail to fire

1847
9
Jump to solution
01-31-2019 05:32 AM
AndrewHargreaves2
Occasional Contributor III

Hello Christine LeslieJason CameranoAmir Bar-Maor‌,ArcGIS Pro Tasks‌ team and ArcGIS Pro‌ team.

I am attempting to use the "Additional Actions" capability of Tasks to both copy attributes and calculate fields either side of an Append function. However, neither are performing as expected. Here are the steps within my task:

  1. Select several points in Featureclass A, to be Appended into Featureclass B
  2. Append the selected points from A to B. Within the Append parameters I set:
    • Input Layer to Featureclass A (including a selection set of features within this Featureclass)
    • Target Dataset to Featureclass B
    •  {location} field of Target to get fieldmapped with {VALVE_NO} of Input (this is a unique ID field)

2a. Additional Action when exiting the step to Calculate Field values into only the Features or records created in this step - ie: only those points just appended to this layer in this step.

Although the Append from step 2 works, the field mapping to pass {VALVE_NO} into {location} fails to occur. Further, the Additional Action supposed to occur at the end of the step to field calculate values into the fields of the features just appended also fails and gives me the below error:

 Please can someone point out where I'm going wrong?

Thanks

0 Kudos
1 Solution

Accepted Solutions
JasonCamerano
Esri Contributor

Yes, it sure is on the Roadmap now 🙂

We will work to get this in for the next release of Pro. 

View solution in original post

9 Replies
AndrewHargreaves2
Occasional Contributor III

Hello again Christine Leslie ‌Jason CameranoAmir Bar-Maor Charles FernandesArcGIS Pro Tasks‌ and ArcGIS Pro‌ teams. I adjusted my task to try to get something working. It's now configured as shown in the below. Now I:

  1. Select features from Featureclass A
  2. Perform an append from Featureclass A to B and ask the additional actions to create a selection set of these new features appended into B, which I name NEWAPPENDEDFEATURES.
  3. I set the additional actions of the follow on step to start by selecting the features in NEWAPPENDEDFEATURES so the field calculation I use to set some Workforce for ArcGIS‌ values will only apply to these features.

However, as you'll see in the below when I run the task the append occurs, but the selection of features within NEWAPPENDEDFEATURES fails to occur, meaning ALL features inside of Featureclass B get field calculated with the Workforce for ArcGIS‌ values.

Again, any help is appreciated.

0 Kudos
AmirBar-Maor
Esri Regular Contributor

Hello Andrew,

Did you try to force Append into editing session using the setting documented here?

Thanks,

Amir

0 Kudos
AndrewHargreaves2
Occasional Contributor III

Amir Bar-Maor‌ - the "enable undo" function of the #append tool‌ is not available when used inside of a #arcgis pro task‌ . 

0 Kudos
JasonCamerano
Esri Contributor

Hey Andrew,

Unfortunately when GP commands are run the features that are created are not part of the edit session.  The edit session is what the "Features Created In This Task" and "Feature Created In This Step" are listening to.  There for it doesn't notice that anything was created via GP tools. 

In terms of workarounds that might work for your situation.  Do you have editor tracking turned on any of the feature classes?  If so you can query features based on the date created and select them that way (using select by attribute).  Then you can run a calc action on the currently selected features. 

Additionally, writing a script tool (that can be embedded within Tasks) could combine all this logic into one step so the new features can be appended and selected programmatically and then calculated via the task or the script tool.

Sorry for the inconvenience,

Jason Camerano

JasonCamerano
Esri Contributor

Upon testing this does seem to work.  However, the "Enable Undo" toggle is only available on the Full GP pane and not whilst embedded within a Task.  The work around for this would be to uncheck the "Embedded" checkbox in the Task Designer for this step of Appending.  Unfortunately doing so will now allow you to preset any of the parameters of the Append tool, it will open up the GP pane and allow the user to run the tool.  Yet the features can now be added to the edit session and thus selected by Task Actions "Features Created in Task/Step"

AndrewHargreaves2
Occasional Contributor III

Jason Camerano‌ thanks for the clarification - although, it's not what I wanted to hear . I'm sure there's good reason why the enable undo‌ functionality is not available when a GP tool is embedded in a arcgis pro task‌ it really detracts from some of the very attractive capabilities available through the #additional actions of selecting, copying attributes and calculating fields upon, during or when leaving a task. Is this on a roadmap somewhere?

0 Kudos
JasonCamerano
Esri Contributor

Yes, it sure is on the Roadmap now 🙂

We will work to get this in for the next release of Pro. 

AndrewHargreaves2
Occasional Contributor III

Thank you Jason Camerano‌ (and Amir Bar-Maor‌) !

0 Kudos
JasonCamerano
Esri Contributor

Hello everyone.  Just to let you know the "Enable Undo" functionality will be available in ArcGIS Pro 2.5.  The setting will be able to toggled on or off both in Designer and during runtime.