Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I change fields in a data table?

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?

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Not applicable
Author

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