Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
ssssssss88888888
Contributor II
Contributor II

RecNo()-1 in load script

Hello, 

 

We are just curious, we are reviewing the if script function article, and we are wondering why the script includes RecNo()-1. we understand why the RecNo() function is included, but not sure why it would give a value of -1? Any help would be appreciated !

 

SET FirstWeekDay=0; Load Date(MakeDate(2022)+RecNo()-1) as Date Autogenerate 14;

Labels (1)
1 Reply
QFabian
MVP
MVP

Hi @ssssssss88888888 , i think is just to start with the first date, because recno() starts in 1, and the script wants to starts adding 0

 

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/CounterFunctio...

RecNo - script function

This script functions returns an integer for the number of the currently read row of the current table. The first record is number 1.

 

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.