AnsweredAssumed Answered

table::field, GetField ("field") or GetField (table:field)

Question asked by Cécile on Dec 22, 2018
Latest reply on Dec 23, 2018 by comment

I know that for when passing script parameters it is preferable to use the Get  Get(FieldName) GetFieldName (table::Field) function.


In field definitions however, is it also the case? 1st line below is the field reference, 2nd is my perception of another way to write the same using get.

This time I let it like the calculation app wrote it for me but I usually add the table name even when in context, is it better?


I wonder, when defining a field with an autoenter calculation, if there is a better grammar than another. In my mind I think (thought!) that there are several equivalent ways to write the calculation to sum the values contained in the field Cost and the field Margin and wanted to know which one is better, using plain fields references or a GetField function.


I thought the following possibilities were equals (Note that I strokethrough the wrong grammar one to avoid inducing errors in other newbies mind):


Cost + Margin

Price::Cost + Price::Margin


GetField (Cost) + GetField (Margin)

GetField (Price::Cost) + GetField (Price::Margin)


GetField ("Price::Cost") + GetField (Margin)



Edited: Which calculation is best for field definition? Was the original title, however, the way I formulated my question revealed that I did not understand how to work with functions. The thread became a correction to that.