Question

Creating custom cross-table unique values

  • 22 October 2021
  • 2 replies
  • 0 views

Badge +5

Hi,

I'm creating objects in 5 different tables and I have a requirement for the object's IDs to be unique accross all 5 tables. I also need to set the starting ID value with a UserParameter

Suppose I had 3 features created in each table.

My objective would be :

Ids 1 to 3 in table A

Ids 4 to 6 in table B

Ids 7 to 9 in table C

...

Would anyone have a suggestion for the best way to do this?

I've tried with counters and feature holders but I haven't been successful. Strangely, I get something like

table A : 1,2,3

table B : 1,2,3

table C : 4,5,6

although it seems to me I'm doing the exact same thing between table A and B and between table B and C...

 

Cheers !


2 replies

Userlevel 1
Badge +21

As long as your counters have the same name and the scope is set to global you shouldn't have to do anything more

Badge +5

I see. So you have to set "Count start" to 0 although you expect it to continue from where the previous counter (with same Counter name and Global Count Scope) finished. That's what I've done now and it works.

Thanks ebygomm.

Reply