cancel
Showing results for 
Search instead for 
Did you mean: 

Snaplogic GET SNAP pagination setting

dpan32
New Contributor

Hi,

I need to set the pagination for get snap where there is 1210 pages. The output for without pagination is below

dpan32_0-1701268071761.png

When I am giving the expression $entity.meta.pageTotalCount>100. its throwing error that $entity is not defined.

dpan32_1-1701268236777.png

Can anyone help what should be the appropriate expression in hasnext field and next url?

1 REPLY 1

koryknick
Employee
Employee

@dpan32 - I believe you are close.  Couple thoughts.  The dynamic validation in this snap is trying to interpret the expression based on the input data, but when executed, it will work against the output data.  When I am working to build the "Has next" and "Next URL" settings, I usually pull in a Mapper snap after the HTTP Client / REST Get snap to work out the syntax.  

In your case, I believe what you want is $entity.meta.pageTotalCount == 100 (not > 100).  That way it will continue cycling until the count is less than 100.

Hope this helps!