Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Load Script

Hi Firends,

I have following data table together with part of data load script

Screenshot_1.png

From the above script a field (RNFLG) is created. Now what I want is to'RN' to record in the last record as well. To do that I want to skip the record (2nd from last) and want to match my condition with the 3rd row from last record so that all condition in my script match and last record will be marked as 'RN' . But I do not know  how to skip one record and  to peek the next record. Pls help me get my script corrected.

3 Replies
marcus_sommer

It's your third condition of peek('FLG') which prevents that you get 'RN' in the last record. This means you need to decide to remove this condition or to adjust it maybe with an additionally match() to query multiple values.

If this isn't wanted you will need to extend your logic to query which of the records is the first, n-th and/or the last.

- Marcus

upaliwije
Creator II
Creator II
Author

Thanks,

But the all records and flag value should remain as it is and I want to skip the 2nd record and peek the 3rd record. Is it possible ?  If not will you suggest an alternative please.

marcus_sommer

Like above mentioned you need to develop a logic which queries the order of your records. With it you could bypass this condition or you might use them to pick your wanted records - with the second parameter of peek() you could define which record should be picked.

Quite probably you couldn't do it with a single load - at least not querying the records and applying the information within a condition or a peek() - else you might need multiple (preceeding) loads in a chain and/or several loads which implement some kind of row-counter with autonumber(rowno(), Field1 & Field2) and/or query the min/max/first/last values and are then joined/mapped to the origin load/table.

- Marcus