Any difference between the two? Besides that utils.hasRecords() can be used in calcs. Speed, reliability, etc…
No other difference. Simply inherited from the old days…
No inheritance from the old days: It’s duplicated on purpose:
Technically, the hasRecords() function belongs under the databaseManager node, but this node in not accassible in the Calculation editor.
Since you need to check whether a relation has records, before working with the related records, also in calculations, the hasRecords() function was also made available under the utils node, which is accessible in the Calculation editor.
Paul
I’ve used the databaseManager.hasRecords() in calculation and that works also.
Nodes that are hidden in the Calculation Editor are not supported in calculations.
Having said that: some might work databaseManager.hasRecords() is one of them.
Bottom line: Inside Calculations:
- do not touch the GUI
- do not update data
- do not insert data
- just retrieve and process data, to return a value.
Paul