Populate preset value from featureclass

735
5
02-20-2023 01:12 AM
Status: Already Offered
Labels (1)
TorbjørnDalløkken2
Occasional Contributor

When creating a ArcGIS Pro task, it's possible to create a task step with the action "Get Attributes" which allows the user to input values. This might be used later, for example in a task step which uses the action Calculate Attribute. 

Today it's possible to specify a preset value for the input field, but not a dynamic value. In the configuration of the "Get Attributes" action, we already define the related table and field, so this is already done. The idea is to be able to use the existing value from this field as an alternative to  manually specifying the preset value. 

5 Comments
AmirBar-Maor
Status changed to: Already Offered

In the Task Designer choose a 'Copy Attributes' action:

AmirBarMaor_0-1676892366074.png

Then specify the selection, table field, and variable.

Make sure only one feature is selected in the source table.

 

 

 

TorbjørnDalløkken2

Hi @AmirBar-Maor .

There might be some misunderstanding here. I'm aware that it's possible to copy attributes with the additional action, but that's not what I was describing (or trying to describe).

I've selected a feature and have created a task with the action Get Attributes, where the user can change the attributes.

ArcGISPro_swSFRRyP84.png

Here you can see that the action "Get Attribute" shows the default value of <Null>  on the attribute values, but the selected feature has already values in these fields. The idea is to show these values.

I can't see that it's possible to assign the "Get Attribute"-preset value to the feature's value (or value from Copy Attributes as you mentioned).

AmirBar-Maor

@TorbjørnDalløkken2 

If I understand correctly you want the user to view the attribute and modify it before copying it.

This must work against a selected feature (different features might have different values).

 

Could that be achieved by opening the Attribute pane in one step where the user can view and modify them before you copy them?

This of course will not work if you do not allow the attributes of the source feature to be modified and if you only want to show a subset of attributes to the user.

 

TorbjørnDalløkken2

@AmirBar-Maor 

You're almost right, I want the user to view the attribute and modify it. Since I'm doing the calculate field action, I don't need to copy the attribute. Just to view and edit. It could be done by opening the attribute pane, but I don't want the user to view or modify any of the other fields. If I expose the other fields to the user, I'm pretty sure some of them would end up editing the wrong attribute 🙂

One workaround is creating a pythonscript that changes the visibility of the field. I'll probably go for that solution.

 

ALS
by

Did you ever get this to work other than using python?   I want to do the same thing.  I have like 20 fields in the address table but I only want the user to be able to see three of the fields they can update.   If you open the Attribute Pane it shows all 20 fields (too much information).   I would like House number, Unit number, and Building prepopulated.   Then the user can easily update which fields need updated.