Select to view content in your preferred language

Copy Attributes from one Feature to Another

3462
4
04-04-2012 11:50 AM
GregoryLewis
Emerging Contributor
Hello All,

The application I am working on is based on in-field inspections which can have a number of sample grids polygons. In the field many of the sample polygons will have the same or very similar values to each other.

I have designed an edit form for an existing shapefile. In the attributes of the shapefile there are a number of fields. I am looking for a solution on how to copy the values of one features attributes to another one. I am sure this is simple problem but I am not having much luck with it and thought I would ask for some pointers....

What I would like to do:
- On the opening page of the the form add a textbox and a command button
- The user will enter in the unique Site ID for the sample location to be copied from
- The user will click the command button and it will copy over the values from the sample site identified in the above text box and paste them into the current record being edited.

Any advice on this would be greatly appreciated!

-Greg-
Tags (3)
0 Kudos
4 Replies
DeniseKing
Esri Regular Contributor
Greg,

Use the Repeat Attributes tool to have ArcPad populate the attribute information of any new feature you creating using the attribute information of a previously selected feature. In ArcPad Studio, the internal command is 'togglefeaturerepeat' and can be added to standard or custom ArcPad toolbar. Look at Quick Start Tutorial section of Customizing ArcPad Help (ArcPad Studio > Help) and work through Tree Inventory > Exercise 1-Toolbars. This exercise will introduce you to the basic techniques for creating custom toolbars and adding built-in and custom  tools.

Cheers,
Denise
0 Kudos
GregoryLewis
Emerging Contributor
Thank you for the response.

I have looked at the repeat attributes tool but this seems to only work when you are creating new features. I am working with a sample grid that is the polygons are calculated into a shapefile, the attributes for each polygon are then edited with the appropriate values.

I was doing some research into possibly copying the values of the selected polygon to an external Dbase and then importing those values to the selected record  but I haven't had any luck in doing this either.

Thoughts?

Thank you,
-Greg-
0 Kudos
GregoryLewis
Emerging Contributor
Hi All,

I got this one figured out and it turned out pretty simple. I just declared a bunch of global variables, had one button that set them based on the current record in the edit form. Then added a another button that when clicked copied those values to the controls on the edit form for another record.

Seems to be working well.

Thanks,
-Greg-
0 Kudos
IngridHogle
Frequent Contributor
Hi Greg, Would you be willing to share your applet and apl code as examples to work off of? I am trying to do the same thing, and I find it so much easier to work off of other people's code that works than to try to start from scratch! Thanks! - Ingrid