Programmatically Creating Dict Items (OpenInsight 64-bit)
At 18 NOV 2021 04:11:48PM BrianWick wrote:
Is there a way to programmatically create Dict Items, including Symbolics.
and
Provided a dict item is NOT indexed would I be on safe ground just to do a:
delete DICT.MYFILE,DICTITEM
tx
Bri
At 18 NOV 2021 05:01PM Andrew McAuley wrote:
Unless there are have been major undocumented changes, (which seems unlikely), then simply opening the dictionary and writing to that file should create a well formed dictionary item. Deleting a non-indexed column should create no issues unless you try and compile an object which references it.
World leaders in all things RevSoft
At 18 NOV 2021 06:46PM BrianWick wrote:
Tx Andrew -
it looks like I will use the Repository function to programmatically compile an SP
My Symbolic dict items all look like:
Declare SomeUniqueFileNameSP
@ans = SomeUniqueFileNameSP(param1,param2,param3)
BUT 'SomeUniqueFileNameSP' will change for each new file's dictionary….
So doing just a copy from a TEMPLATE dictionary to the new file's dictionary does not change 'SomeUniqueFileNameSP'
the idea is to :
#1) copy the TEMPLATE dictionary to the new file's dictionary.
#2) change the source code in FM8 of the symbolic dict items to reflect the NEW 'SomeUniqueFileNameSP'
then presumable some recompile needs to occur?
would that be handled thru the repository function somewhere ?
tx
Bri
At 18 NOV 2021 07:31PM Barry Stevens wrote:
Tx Andrew -
it looks like I will use the Repository function to programmatically compile an SP
My Symbolic dict items all look like:
Declare SomeUniqueFileNameSP
@ans = SomeUniqueFileNameSP(param1,param2,param3)
BUT 'SomeUniqueFileNameSP' will change for each new file's dictionary….
So doing just a copy from a TEMPLATE dictionary to the new file's dictionary does not change 'SomeUniqueFileNameSP'
the idea is to :
#1) copy the TEMPLATE dictionary to the new file's dictionary.
#2) change the source code in FM8 of the symbolic dict items to reflect the NEW 'SomeUniqueFileNameSP'
then presumable some recompile needs to occur?
would that be handled thru the repository function somewhere ?
tx
Bri
Brian,
Assuming you are in OI10. Have you tried this.
One routine for all your symbolics
In symbolic:
@Ans=Function(symbolics_controller())
ssp:
function symbolics_controller(Void)
work =RTI_GET_CURRENT_SYMBOLIC()
TableName = work<1,1>
symbolic = work<1,2>
(do stuff dependent on Tablename & Symbolic names)
return Ans
PS:
Dont know where RTI_GET_CURRENT_SYMBOLIC is documented
At 19 NOV 2021 03:46PM BrianWick wrote:
tx barry -
yes OI10..
i had thought of something close to this BUT for symbolics that get called a lot during an rlist request (For example), that involves an additional 'call' to the SP where the code is actually executed - which requires more recourses and slows down everything.
BUT…
What you provide seems like the best way to do it - obviously I am not the first - and that is why RTI_GET_CURRENT_SYMBOLIC exists ?
and digging into the dictionary - seems quite shaky.
tx for the great suggestion barry.
bri