Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
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 II
Champion II

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

];

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 II
Champion II

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

];

View solution in original post