Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have loaded some data table. I want to change some field values in these data tables.
Let a = NoOfRows('TABLE');
Let b = 0;
do WHILE a>=b
LET b=b+1;
loop
How is it possible to change field values in the loop?
Is there something like a reverse peek function?
At the moment, tou can only use INPUTFIELDs and modify them in a macro using a set of INPUTFIELD APIs. In version 9, you'll be able to apply SQL-like syntax and modify tables without reloading the whole document.
In the load script, you can process records one by one (using peek), modify the values and load the modified values into a second table. At the end drop the first table and keep the second one. If your table is big, it will be extremely slow, though... Check if you really need to process the data one row at a time. You might be able to do the same using a regular load with some IF functions...
Oleg
No there is no "reverse peek" function but you can certainly use your logic within the load-script to update some of your data, eg.
Let a = NoOfRows('TABLE');
FOR i = 0 To $(a)
// now join your data, change it, etc.
Next
Hope this helps ...
Best regards
Stefan