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

What is the use of AutoNumber() ??

HEy,

What is the use of AutoNumber() ?? Please help by an example.

Thanks

18 Replies
nikhilgarg
Specialist II
Specialist II
Author

But in some examples i have seen using Autonumber(1) ;

What is the sue of this??

nikhilgarg
Specialist II
Specialist II
Author

But in some examples i have seen using Autonumber(1) ;

What is the sue of this??

nikhilgarg
Specialist II
Specialist II
Author

Hey,

WHat is the difference between Autonumber (1)  and Autogenerate 1 ??

nikhilgarg
Specialist II
Specialist II
Author

Hey,

WHat is the difference between Autonumber (1)  and Autogenerate 1 ??

arixooo123
Creator III
Creator III

Hi Clever

If we use Autonumber on two different tables but on the same fields, let's say Sales Table and Cost Table, will it generate the numbers in a way that customers and companies on both table match with the same key number?

I mean if the function generate some numbers independently, it won't work the way that we want to.

Clever_Anjos
Employee
Employee

Autonumber() will return same values for same input

Example

Autonumber('foo') returns 5 for example, anytime 'foo' is read no matter what field, 5 will be returned

If you need different values for different fields, use an identificator

Autonumber('foo','Sales Table') and Autonumber('foo','Cost Table')

can (not always) return different values

arixooo123
Creator III
Creator III

Thanks Clever,

You said and I quote:

"

Autonumber('foo','Sales Table') and Autonumber('foo','Cost Table')

can (not always) return different values

"

If they could return different outputs for the same input, then the rows will not be matched and our calculations won't return the correct result. Is that right?

You see, we have a couple of complex keys on some huge tables, I was wondering if using autonumber to replace those keys could be beneficial in terms of memory usage. what's your suggestion?

Clever_Anjos
Employee
Employee

>>If they could return different outputs for the same input, then the rows will not be matched and our calculations won't return the correct result. Is that right? Depends what you name "correct", that function will return same values if you need, and maybe different ones if you don´t need.


I suggest you using autonumber and their similars autonumberhash()


Ron1
Partner - Creator
Partner - Creator

I am using Autonumber() on my date field to due to some business requirement to generate serial numbers.

However it is not generating serial numbers. Can you please help me to fix this

See below:

DateNumber
05.12.201931
12.12.201932
19.12.201933
26.12.201935
02.01.202034