Re: Assigning values to virtuals in a grid

Keith Canniff

If the 3 values can be calculated on one stats run, why not return the value as 1 string (function return) with 3 delimited values in it (let's say they are number values in string form), then use strtoken and strtokenidx to parse out the 3 values into the virtual variable columns?

1 function call, 1 database stats pass, 3 returned values.


-----Original Message-----
From: <> On Behalf Of Avgerinos
Sent: Monday, August 13, 2018 9:03 AM
Subject: [magicu-l] Assigning values to virtuals in a grid

Hi magicians

I 'm facing the following problem:

I have an online task with a grid displaying a table. There are 3 more columns which correspond to virtual-variables, with their contents calculated (by record) on the fly.
The calculation is based on some database statistic-processing. All 3 values are related, so I can have all 3 values in one database-stats run.

The solution I found so far to display these calculated values correctly on the grid, was to create a 3 functions, each calculating a value and assigning it to each virtual.
My problem is that since I use 3 functions, I end up executing the statistic processing 3 times (instead of 1) and this is the cause for slow grid-drawing and navigation.

Any ideas to improve?

Thanks in advance

Join to automatically receive all group messages.