How to discharge quickly values on unstored field

Hi to all,
I have a simple question: I need to clear quickly some values stored into a unstored field.
I populated the foundset with some values and I want, quickly, resetting the values to null
The tables are very large and do not want to use iterators and for loops.
Thank you in advance.

Hi Gianluca,

I would keep track of the affected JSRecords in a (form) global variable (Array).
This way you have direct access to the records even if they are no longer in your current foundset.
You then loop through your array and reset the values.

Hope this helps.

Hi Robert,
I would not want to use this way, because the foundset could also be of about 300,000 records.
I tried to clean the foundset with “foundset.clear” but the values on the unstored fields remains.
There is no way to reset the unstored fields without process the records one by one?

Thanks

Hi Gianluca,

300K is a lot :)
But do remember you are only storing a reference to the JSRecord. And it seems they stay in memory/cache anyway so I wonder if it adds a lot more weight to it.
In any case using the Array approach will make your looping through it a lot more efficient than looping through the foundset because you will only target the records that have in-mem data.

As for an easier way. Perhaps Johan or Rob can tell us more.

Hi Robert,

I know that the approach “in-mem” is a bit heavy, but unfortunately I have to load ‘on the fly’ of information that other users should not see.
I’ll try to do as thou hast advised (pending advice from Johan or Rob :) )

Thanks a lot