Attribute Assistant: Generate Same ID in two different tables

1000
1
Jump to solution
08-16-2016 08:08 AM
Labels (1)
JoeBorgione
MVP Emeritus

Is it possible to use the GENERATE_ID method to generate the same id into to two different tables?  I'm trying to piece together the logic in my head as to how it could work.  Here is my situation:

I create point features that have names and I have  an alias table for those points, where the aliases are derivatives of those names.  I use this point feature class for geocoding with the aliases as the alt_names table.  Let's say I have a point and it's full name is:

JACKSON ELEMENTARY SCHOOL

That point would have at least two different aliases:

JACKSON ELEMENTARY

JACKSON

What I'm after is a Join-Item between the proper name on the point and the alias records.

As I'm typing this out, I can already see a flaw in using the GENERATE_ID method for the aliases, because of the way the GENERATE ID sequence counter is incremented.  Perhaps the way to go would be to use the LAST_VALUE method referring back to the point attribute table, and the last generated id.  Thoughts?

That should just about do it....
0 Kudos
1 Solution

Accepted Solutions
JoeBorgione
MVP Emeritus

It looks like the LAST_VALUE method only looks that the current/active table, however LINK_TABLE_ASSET seems to do the trick. As I create a point I fill in the info needed and the GENERATE_ID method does it's thing.  With that new point still selected, I can create as many aliases as I like, and the generated id from the point populates the appropriate field in the alias table....

added edit:  When using the GENERATE_ID for this particular purpose I set On Create = 1 along with Manual Only = 1.  I switched On Change (Attributes) as well as On Change (Geometry) to 0 (zero).  If you have  either of the the two 'change' fields non-zero, it'll increment that id for the point, and goof up the desired relationship between the point feature and the (related) alias table.

That should just about do it....

View solution in original post

0 Kudos
1 Reply
JoeBorgione
MVP Emeritus

It looks like the LAST_VALUE method only looks that the current/active table, however LINK_TABLE_ASSET seems to do the trick. As I create a point I fill in the info needed and the GENERATE_ID method does it's thing.  With that new point still selected, I can create as many aliases as I like, and the generated id from the point populates the appropriate field in the alias table....

added edit:  When using the GENERATE_ID for this particular purpose I set On Create = 1 along with Manual Only = 1.  I switched On Change (Attributes) as well as On Change (Geometry) to 0 (zero).  If you have  either of the the two 'change' fields non-zero, it'll increment that id for the point, and goof up the desired relationship between the point feature and the (related) alias table.

That should just about do it....
0 Kudos