Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Autonumber() in Incremental Loads

We are trying to use autonumber() with incremental loads. On the initial load, we have the field with the autonumber() working fine.

AutonumberField1
1A
2B
3C
4D

However, we want to keep the autonumber() continuing on subsequent incremental loads from where it last left off; so it would start the next with 5. Is this possible with the autonumber() function?

1 Solution

Accepted Solutions
sunny_talwar
Not applicable

Re: Autonumber() in Incremental Loads

Are you doing a autonumber on Field1? If yes then you can try the following:

I have not tried it, but what if you create a variable, lets say vCount

count:

LOAD Count(AutoNumber) as AutoNumberCount

Resident yourTable;

LET vCount = Peek('AutoNumberCount')

and then in your incremental load do AutoNumber(Field1) +$(vCount) as AutoNumber, but do this on a resident load table with a where condition specifying Where not Exists(Field1).

Again, I have not tested this, but I feel a variation of this should work for you.

Best,

Sunny

1 Reply
sunny_talwar
Not applicable

Re: Autonumber() in Incremental Loads

Are you doing a autonumber on Field1? If yes then you can try the following:

I have not tried it, but what if you create a variable, lets say vCount

count:

LOAD Count(AutoNumber) as AutoNumberCount

Resident yourTable;

LET vCount = Peek('AutoNumberCount')

and then in your incremental load do AutoNumber(Field1) +$(vCount) as AutoNumber, but do this on a resident load table with a where condition specifying Where not Exists(Field1).

Again, I have not tested this, but I feel a variation of this should work for you.

Best,

Sunny