I was trying to work this out about a year ago and was told that using unique identifiers in my scripts would work better than utilizing the "index=31" function for accessing objects in a form.
We have a very complex system and if a programmer has to add a new button or field, our scripts are immediately broken and require alot of attention to function.
However, after reviewing the Oracle forms with one of our programmers, I am not sure that they could actually assign unique identifiers to each field.
For instance, when there is a column called year that pertains to a query from a table, that entire column is represented to the programmer as a block when viewed in Oracle forms. The block is "tablename.year"
That is how it is identified. There is not access to the field itself in designer. Likewise, many of the fields that may not be displayed on the page unless rows and rows of data are the result of the query to the table.... those fields don't even exist until run time.
Does anyone have any idea how to utilize unique identifiers for each field in this case? I don't see how it is possible.
Are there any workarounds for this issue so that my scripts won't break with every change a programmer makes to a form?
Currently, TP v. 5.6 and Oracle forms ver. 9.0.4
This has been a long standing issue with Oracle Forms. It not only happens when a control is added - it also happens on a simple recompile. Back in the day when I was doing load testing on Oracle Forms with QALoad, I had to re-do the scripts every time the app was recompiled because all the internal identifiers changed.
The only workaround that I am aware of is the one you identified - have the programmers give a unique identifier to controls that will not change. I don't even know if that is possible in Oracle Forms. Someone who is familiar with Oracle Forms development would have to answer that question.
We put an * in the value of the caption in the properties of the object. Fi *.tmp - NotePad
Our app generates reports in a notepad document the name of the document is dynamic. the * replaces the dynamic part.