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

key field autonumber function

Hello,

I would like to give a field as KEY in next table:

lomi89_0-1670870655458.png

 

I tried autonumber but I cannot give it.

 

Thank you very much

Labels (7)
1 Solution

Accepted Solutions
MartW
Partner - Specialist
Partner - Specialist

hello @lomi89 , please take a look at the documentation around this.

https://help.qlik.com/en-US/sense/August2022/Subsystems/Hub/Content/Sense_Hub/Scripting/CounterFunct... 

also autonumber will autonumber all fields with the function.

so if you say something like this (see codeblock) then it should autonumber.

Table:
load *,
autonumber(PRODUCT & YEAR & FECHA_COMP) as KEY
;
LOAD
PRODUCT, YEAR,FECHA_COMP
FROM (LOCATION) ;

View solution in original post

2 Replies
MartW
Partner - Specialist
Partner - Specialist

hello @lomi89 , please take a look at the documentation around this.

https://help.qlik.com/en-US/sense/August2022/Subsystems/Hub/Content/Sense_Hub/Scripting/CounterFunct... 

also autonumber will autonumber all fields with the function.

so if you say something like this (see codeblock) then it should autonumber.

Table:
load *,
autonumber(PRODUCT & YEAR & FECHA_COMP) as KEY
;
LOAD
PRODUCT, YEAR,FECHA_COMP
FROM (LOCATION) ;
barnabyd
Partner - Creator III
Partner - Creator III

G'day @lomi89,

Would the rowno() or recno() functions give you what you want?

Cheers, Barnaby.

Barnaby Dunn
BI Consultant