Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 10 OCT 2018 05:12:00PM Barry Stevens wrote:

OI10.0.3

After watching Martyn Phillip's video :

"Modernising the writing, debugging and management of Symbolic Code – Scheduled for OI 10.0.4."

Changed all my symbolics to the following (passing the SymbolicName and Table as parameters in the interim)[pre]@Ans=Function(evop_symbolics_controller('<passing fieldname>','<passing tablename>'))[/pre]

Having ALL the symbolics code in one place is a great idea for many reasons other than debug.

I was wondering if anyone can confirm or update me on the following observations:

One thing I did notice was that any symbolic dependencies were not being updated in an edit table.

I put this down to there being no {} field names in the symbolic code in the dict table, so it does not know any dependencies (I could be wrong and I have an error somewhere)

I have got around this by doing a recalc of all the columns in all the edittables on the form, triggered by the CELLCHANGED event.

Also, I found I also had to play around with @record and ATRECORD to get the updated record data at the start of the symbolic code routine. [I made the routine global (i.e. for all tables – use of the Table param)]

Barry Stevens


At 10 OCT 2018 05:19PM Barry Stevens wrote:

Here is the top of the code for the function evop_symbolics_controller[pre]Function evop_symbolics_controller(Method,p1,p2,p3,p4)

Declare Function rti_get_current_symbolic,Evop_symb_calc_functions,retstack,calc_perc,gst_incl_calc,Get_Property

declare function Get_Current_Event,SRP_Sort_Array
$Insert equates
$Insert Evop_symb_calc_functions_equates

* Title……….: Controller for the symbolics in all the tables * Author…….: BARRY * Date……….: 17/09/2018 * Release…..: * Description.: * * use: 10.0.3 - @ans = Function(evop_symbolics_controller('NameOfSymbolic','TableName')) * 10.0.4+ - @ans = Function(evop_symbolics_controller()) * Update History * Who When What * —– ——– —————————————————— * * *when 10.0.4 is released use rti_get_current_symbolic(), therefore no need to passthe name of the symbolic in the method

Who=Retstack()<2>[2,"_"]
TableName=null$
Retval=null$
If Assigned( method ) Else method=null$
If method == null$ Then
	work=rti_get_current_symbolic()
	TableNameable = work<1,1>
	method = work<1,2>
End Else
	TableName = p1
end

Atrecord=Get_Property(@Window,"ATRECORD")

SaveAtRecord=@Record
thisEvent = Get_Current_Event()
If thisEvent _eqc 'READ' Then
	If @record Else
		@record=AtRecord
	end
End Else
	If AtRecord then
		@record=AtRecord
	End
End

*which table is the symbolic in*

Begin Case
	Case TableName	_eqc	'properties'
		Gosub do_properties_symbs

Case TableName _eqc 'sites'

		Gosub do_sites_symbs

Case TableName[1,10] _eqc 'sold_data_'

		Gosub do_sold_data_symbs

Case TableName _eqc 'contacts'

		Gosub do_sites_symbs

End Case

@Record = SaveAtRecord

Return Retval

[/pre]

Barry Stevens


At 10 OCT 2018 05:26PM Donald Bakke wrote:

I believe that is correct. We've been using our own method similar to Martyn's blog article for sometime via our service modules and we've experienced this issue. The dependency tree cannot be updated when you omit references to @RECORD<fieldPos> or {colName} items in the native symbolic code.

Don Bakke

SRP Computer Solutions, Inc.


At 10 OCT 2018 05:27PM Barry Stevens wrote:

Thanks Don!

Barry Stevens

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/9daccaa121e5d5757ab80b70b.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1