Select to view content in your preferred language

Using VBS to edit records in other features

655
0
03-24-2013 02:13 PM
AaronAmbrose
Deactivated User
Hi all,

Based on the value of a field in one feature, I am trying to alter records (behind the scenes) in associated features.
I got this to work fine, but there is some clean up that I can't figure out.

Basically, when I change the Unique ID of a parent feature, I want the stored UID values in associated features (it's children) to adjust as well. So as I was creating this script, I made the value of the UID in both the parent and the child objects visible attributes - so that I could actually see the number change take place.

This works fine and dandy: I see it happen. But then when I enter the child feature form and take a look at the table, it still has the old value. If I DON'T open the child feature, but close Arcpad, then reopen Arcpad, then open the child feature, the value is now null!?
And if I leave the feature alone altogether, then when I take my next step (which is to export shapes to CAD), the values are as I hoped: changed to match the parent.

Now, the child features are only to be opened via a launch edit button from the parent feature form (which then re-establishes the UID association), so, technically, I don't have much to worry about. But if anyone tries to manually edit one of my child features; bang, that is where the problem will occur. Because the stored Parent UID value reverts to the originally set value (or null - when Arcpad has been shut down in between these processes).

So what the heck is going on?
And what can I do to lock in the edited value?

Thanks in advance!

Aaron
Tags (3)
0 Kudos
0 Replies