We are creating a complex labels in electrical industry model that load data from various related tables. Using the rules for Labeldefinition we start the Label also when any changes applie to the related tables. The label definition we created use a specialised Oracle function which create the text. However when we make some changes in the related table and the label udpate starts, the changes have not been commited in the database and function returns old data.
My question is, does any one of you know about client side rule in Map that is started after the data has been written and commited in the database? I believe there has to be something like this.
Solved! Go to Solution.
Solved by maherich. Go to Solution.
Solved by drewbb. Go to Solution.
Certainly you can set up client side feature rules that are enforced after insert and/or update. When you define a feature rule, one of the arguments is the RuleTriggerEvent. This enum can have a value of AfterInsert, AfterUpdate, AfterInsertUpdate, etc.
Related, in the label properties, there is a Regeneration Definition. You can use this tool to update the label based on edits of related feature classes.
yes, that is exactly what we tried, as it seems obvious that it should work in that way. Unfortunately if you use rules afterinsert or after update the date are not yet written into the database! That means if I start an select statement on database table it returns the old data and not the update ones.
The same way works also Label regeneration definition. It fires the label regeneration on update of related table. But if the label use any Oracle function to get the data from database, we always recieve the old data not the updated ones.
Therefor we are looking for any way how to start the label regeneration after the data has been written to database = commited.
Are you doing the updates to the related tables within the same Oracle session/transaction? If so, you should see the updates with any select statements even before a commit.
We did found that the problems was in the oracle function we used. There was used pragma AUTONOMOUS_TRANSACTION which actualy opened new transaction that did not see the updated data. After we removed this out of the function everything works like a charm. Thanks for hint.
Can't find what you're looking for? Ask the community or share your knowledge.