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: 
Anonymous
Not applicable

Pagination with Rest API and loop should not get data before 10 July 2019

Hi,

 

I want to do Pagination with Rest API, i am getting offset and messages from API. My loop should end if offset value is null or data is older than July 10, 2019 (1562716800 - unix time). Offset is an unix timestamp, so first need to convert into date format and then check whether its older than or not.

 

I am using tsetGlobalVar for setting the URL and loop value initially true.

 

 

Then in tJavaFlex i am modifying my URL and checking the offset value whether its null or older than July 10, 2019, if it is then setting v_loop value to false.

 

 

First i am converting unix timestamp to date and then to UTC timezone and then using in the condition to check if its order than 10 July 2019 or not. But getting below error :-

 

0683p000009M8eV.png

 

Please help me how can i check dates in the condition and can set my loop to false.

 

Thanks,

Abhishek

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hi,

 

I have some progress in this, please check the below image:- 

 

0683p000009M8ea.png

 

I have the condition row3.offset!=null then convert the unix timestamp to UTC date and then compare two dates( without if condition if offset is null i am getting null pointer expection). Result of the value of dt_UTC and x is below :- 

0683p000009M85d.png

 

So i am getting value -1 from x but when using x value in the if condition again to set the loop false, i am getting error :- 

 

0683p000009M8ef.png

 

0683p000009M8ek.png

 

Do anyone know, why i am getting x cannot be resolved a variable, as i have already defined x earlier, and should i do to remove the error.

 

Thanks !