Hi Jedox colleagues,
We are developing a simulation app on Jedox Web, where dimension elements are not added via modeller or ETL/ERP
but via a spreadsheet UI (with macros / palo_eadd).
The element name should be an ID and additionally it has a label attribute.
The ID should of course be unique and sequential. (before we tried GUIDs via uniqueid() but this was impractical)
So when a user creates a new element and the last ID was 8 then the new one should be 9.
We currently do this via palo_element_list_children and rsort to get the max ID and then add +1 to this.
(as there are different hierarchies in those dimensions it should also work related to a certain tree)
I am wondering if there are better ways to do it - and maybe also more secure/reliable ways in multiuser environments,
where 2 users might press the create-button at the same time.
(maybe something like auto identity columns in relational databases)
Thanks for any thought / suggestion.
JCO
We are developing a simulation app on Jedox Web, where dimension elements are not added via modeller or ETL/ERP
but via a spreadsheet UI (with macros / palo_eadd).
The element name should be an ID and additionally it has a label attribute.
The ID should of course be unique and sequential. (before we tried GUIDs via uniqueid() but this was impractical)
So when a user creates a new element and the last ID was 8 then the new one should be 9.
We currently do this via palo_element_list_children and rsort to get the max ID and then add +1 to this.
(as there are different hierarchies in those dimensions it should also work related to a certain tree)
I am wondering if there are better ways to do it - and maybe also more secure/reliable ways in multiuser environments,
where 2 users might press the create-button at the same time.
(maybe something like auto identity columns in relational databases)
Thanks for any thought / suggestion.
JCO
