Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jduluc12
Creator
Creator

Increment ID in Load Script

HI,

I have a table in QVD.

ID Value

1    abc

2    efg

3    bhu

Now when i load it then i need to start the ID with a different number and then keep incrementing it till the end.

so the output should look like if I decide to start the ID with 34

ID Value

34 abc

35 efg

36 bhu

what should the load script should look like?

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Or add a prompt , so you don;t have to Edit script everytime to change the value

let a = Input('Enter Value','Enter Start Value');

LOAD rangesum(autonumber(ID),$(a),-1) as NewID,Value INLINE [

ID,Value

1,10

2,20

3,30

4,40

];

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

2 Replies
jayanttibhe
Creator III
Creator III

Hi Jean,

See attached QVW :  OR something like this :

T1:

Load RecNo()+33 as NEW_ID

,*

;

LOAD * INLINE [

ID, Value

1  ,  abc

2  , efg

3  ,  bhu

]

;

Thanks

Jayant Tibhe

vinieme12
Champion III
Champion III

Or add a prompt , so you don;t have to Edit script everytime to change the value

let a = Input('Enter Value','Enter Start Value');

LOAD rangesum(autonumber(ID),$(a),-1) as NewID,Value INLINE [

ID,Value

1,10

2,20

3,30

4,40

];

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.