Pagination to return large list of items in Azure Logic App

Published Aug 02 2021 11:59 PM 1,772 Views
Microsoft

In a previous article Paging using continuation token (microsoft.com), we discussed paging using continuation token to return large list of items. In this article, we will discuss another available feature called pagination that is used to achieve the same result; the difference is that pagination is supported by different set of connectors, and turned on and implemented differently.

 

We will be using SQL Server - Get rows (V2) action for the purpose of this article; for list of connectors that support pagination and the steps to turn it on, check the following link: Get more items or records with pagination - Azure Logic Apps | Microsoft Docs

 

Pagination Behaviors

Some connector actions behave differently than others when pagination is turned on, some might retrieve the results in multiple action calls, while others will retrieve the same results in one action call, as explained below:

 

1- Multiple action calls - the action returns the results in pages based on threshold value and other settings; for example, Skip Count and Top Count in SQL Server - Get rows (V2) or Continuation Token and Max Item Count in Azure Cosmo DB - Query documents.

2- One action call - the action can retrieve more results up to the pagination limit, but return those results as a single message when the action finishes; for example, Azure Table Storage - Get entities.

 

Different Cases

The number of rows returned depends on pagination settings as follows:

 

1- Pagination is turned off and number of rows exceeds default page size (2,048 for SQL Server - Get rows (V2)), default page size of rows are returned, 2,048 rows in this case.

2- Pagination is turned on and threshold is set to value less than number of rows, number of rows returned are in multiples of default page size. For example, if number of rows is 10,000 and threshold is set to 5,000 then number of rows returned is 6,144 rows (3 pages x 2,048 rows).

3- Pagination is turned on and threshold is set to value greater than number of rows, all rows are returned. For example, if number of rows is 10,000 and threshold is set to 11,000 then number of rows returned is 10,000 rows.

 

The above might vary based on other settings like Skip Count and Top Count for SQL Server - Get rows (V2).

 

Implementation

The following steps show how to use SQL Server - Get rows (V2) with pagination turned on to return the complete list of rows from a SQL Server table:

 

1- Add Variables - Initialize variable action to initialize a variable of type Integer named skipCount, the initial value is set to Zero. This variable will be holding the number of rows to skip in each action call.

talsaifi_0-1626425040152.png

 

2- Add another Variables - Initialize variable action to initialize a variable of type Integer named topCount, the initial value is set to 1500, for the purpose of this example. This variable will be holding the number of rows to return in each action call.

talsaifi_1-1626425244864.png

 

3- Add another Variables - Initialize variable action to initialize a variable of type Integer named returnCount, the initial value is set to Zero. This variable will be holding the number of rows returned in each action call.

talsaifi_0-1626425639586.png

 

4- Add Control - Until action with condition set to @less(variables('returnCount'), variables('topCount')). This control will loop until the returnCount variable value is less than topCount variable value indicating that the final result is reached and no more items are available to return.

talsaifi_0-1626433293840.png

 

5- Inside the Control - Until action, add SQL Server - Get rows (V2) action with its parameters set as follows:

- Skip Count is the integer value used to indicate the number of rows to skip, set to skipCount variable value.

- Top count is the string token used to indicate the result set to return, set to topCount variable value. 

talsaifi_1-1626433622516.png

 

6- Turn on Pagination on SQL Server - Get rows (V2) action, following the steps below:

a. On the top right corner of the action, click on the three dots (...).

b. Select Settings.

c. Turn on Pagination setting.

d. Set Threshold to the number of rows that you want the action to return, set to 5000, for the purpose of this example.

e. Click Done.

talsaifi_2-1626433910075.png

 

7- Add Variables - Increment variable action to increment skipCount with the value of the topCount variable

talsaifi_0-1626426111588.png

 

8- Add Variables - Set variable action to set returnCount to the number of rows returned by each SQL Server - Get rows (V2) action call. The value is set to length(body('Get_rows_(V2)')?['value']).

talsaifi_1-1626426383581.png

 

Finally, you can add Control - For each action to loop through the returned list of rows in each Control - Until action iteration to process them as required.

 

Final logic app workflow will look as follows:

talsaifi_3-1626434248219.png

 

For SQL Server connector reference, check the following link: SQL Server - Connectors | Microsoft Docs

%3CLINGO-SUB%20id%3D%22lingo-sub-2552276%22%20slang%3D%22en-US%22%3EPagination%20to%20return%20large%20list%20of%20items%20in%20Azure%20Logic%20App%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2552276%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20a%20previous%20article%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fintegrations-on-azure%2Fpaging-using-continuation-token-to-return-large-list-of-items-in%2Fba-p%2F2522802%22%20target%3D%22_blank%22%3EPaging%20using%20continuation%20token%20(microsoft.com)%3C%2FA%3E%2C%20we%20discussed%20paging%20using%20%3CSTRONG%3Econtinuation%20token%3C%2FSTRONG%3E%20to%20return%20large%20list%20of%20items.%20In%20this%20article%2C%20we%20will%20discuss%20another%20available%20feature%20called%20%3CSTRONG%3Epagination%3C%2FSTRONG%3E%20that%20is%20used%20to%20achieve%20the%20same%20result%3B%20the%20difference%20is%20that%20pagination%20is%20supported%20by%20different%20set%20of%20connectors%2C%20and%20turned%20on%20and%20implemented%20differently.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20will%20be%20using%26nbsp%3B%3CSPAN%3E%3CSTRONG%3ESQL%20Server%20-%26nbsp%3BGet%20rows%20(V2)%26nbsp%3B%3C%2FSTRONG%3Eaction%20for%20the%20purpose%20of%20this%20article%3B%20f%3C%2FSPAN%3Eor%20list%20of%20connectors%20that%20support%20pagination%20and%20the%20steps%20to%20turn%20it%20on%2C%20check%20the%20following%20link%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flogic-apps%2Flogic-apps-exceed-default-page-size-with-pagination%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EGet%20more%20items%20or%20records%20with%20pagination%20-%20Azure%20Logic%20Apps%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3E%3CSTRONG%3EPagination%20Behaviors%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ESome%20connector%20actions%20behave%20differently%20than%20others%20when%20pagination%20is%20turned%20on%2C%20some%20might%20retrieve%20the%20results%20in%20multiple%20action%20calls%2C%20while%20others%20will%20retrieve%26nbsp%3Bthe%20same%20results%20in%20one%20action%20call%2C%20as%20explained%20below%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSPAN%3E1-%20%3CSTRONG%3EMultiple%20action%20calls%3C%2FSTRONG%3E%20-%20the%20action%20returns%20the%20results%20in%20pages%20based%20on%20threshold%20value%20and%20other%20settings%3B%26nbsp%3Bfor%20example%2C%20Skip%20Count%20and%20Top%20Count%20in%26nbsp%3B%3CSTRONG%3ESQL%20Server%20-%26nbsp%3BGet%20rows%20(V2)%3C%2FSTRONG%3E%26nbsp%3Bor%20Continuation%20Token%20and%20Max%20Item%20Count%20in%26nbsp%3B%3CSTRONG%3EAzure%20Cosmo%20DB%20-%26nbsp%3BQuery%20documents%3C%2FSTRONG%3E.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSPAN%3E2-%20%3CSTRONG%3EOne%20action%20call%3C%2FSTRONG%3E%20-%20the%20action%20can%20retrieve%20more%20results%20up%20to%20the%20pagination%20limit%2C%20but%20return%20those%20results%20as%20a%20single%20message%20when%20the%20action%20finishes%3B%20for%20example%2C%20%3CSTRONG%3EAzure%20Table%20Storage%20-%20Get%20entities%3C%2FSTRONG%3E.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3E%3CSTRONG%3EDifferent%20Cases%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThe%20number%20of%20rows%20returned%20depends%20on%20pagination%20settings%20as%20follows%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSPAN%3E1-%20Pagination%20is%20turned%20off%20and%20number%20of%20rows%20exceeds%20default%20page%20size%20(2%2C048%20for%20%3CSTRONG%3ESQL%20Server%20-%26nbsp%3BGet%20rows%20(V2)%3C%2FSTRONG%3E)%2C%20default%20page%20size%20of%20rows%20are%20returned%2C%202%2C048%20rows%20in%20this%20case.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSPAN%3E2-%20Pagination%20is%20turned%20on%20and%20threshold%20is%20set%20to%20value%20less%20than%20number%20of%20rows%2C%20number%20of%20rows%20returned%20are%20in%20multiples%20of%20default%20page%20size.%20For%20example%2C%20if%20number%20of%20rows%20is%2010%2C000%20and%20threshold%20is%20set%20to%205%2C000%20then%20number%20of%20rows%20returned%20is%206%2C144%20rows%20(3%20pages%20x%202%2C048%20rows).%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSPAN%3E3-%26nbsp%3BPagination%20is%20turned%20on%20and%20threshold%20is%20set%20to%20value%20greater%20than%20number%20of%20rows%2C%20all%20rows%20are%20returned.%20For%20example%2C%20if%20number%20of%20rows%20is%2010%2C000%20and%20threshold%20is%20set%20to%2011%2C000%20then%20number%20of%20rows%20returned%20is%2010%2C000%20rows.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EThe%20above%26nbsp%3Bmight%20vary%20based%20on%20other%20settings%20like%20Skip%20Count%20and%20Top%20Count%20for%26nbsp%3B%3CSTRONG%3ESQL%20Server%20-%26nbsp%3BGet%20rows%20(V2)%3C%2FSTRONG%3E.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3E%3CSTRONG%3EImplementation%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThe%20following%20steps%20show%20how%20to%20use%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ESQL%20Server%20-%26nbsp%3BGet%20rows%20(V2)%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bwith%20pagination%20turned%20on%20to%20return%20the%20complete%20list%20of%20rows%20from%20a%20SQL%20Server%20table%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E1-%20Add%26nbsp%3B%3CSTRONG%3EVariables%20-%20Initialize%20variable%3C%2FSTRONG%3E%26nbsp%3Baction%20to%20initialize%20a%20variable%20of%20type%26nbsp%3B%3CSTRONG%3EInteger%3C%2FSTRONG%3E%26nbsp%3Bnamed%26nbsp%3B%3CSTRONG%3EskipCount%3C%2FSTRONG%3E%2C%20the%20initial%20value%20is%20set%20to%20%3CSTRONG%3EZero%3C%2FSTRONG%3E.%20This%20variable%20will%20be%20holding%20the%20number%20of%20rows%20to%20skip%20in%20each%20action%20call.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22talsaifi_0-1626425040152.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F296295iF60165E2E19B1457%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22talsaifi_0-1626425040152.png%22%20alt%3D%22talsaifi_0-1626425040152.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E2-%20Add%20another%26nbsp%3B%3CSTRONG%3EVariables%20-%20Initialize%20variable%3C%2FSTRONG%3E%26nbsp%3Baction%20to%20initialize%20a%20variable%20of%20type%26nbsp%3B%3CSTRONG%3EInteger%3C%2FSTRONG%3E%26nbsp%3Bnamed%26nbsp%3B%3CSTRONG%3EtopCount%3C%2FSTRONG%3E%2C%20the%20initial%20value%20is%20set%20to%20%3CSTRONG%3E1500%3C%2FSTRONG%3E%2C%20for%20the%20purpose%20of%20this%20example.%20This%20variable%20will%20be%20holding%20the%20number%20of%20rows%20to%20return%20in%20each%20action%20call.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22talsaifi_1-1626425244864.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F296296i77E7EE0780EF9B1C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22talsaifi_1-1626425244864.png%22%20alt%3D%22talsaifi_1-1626425244864.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E3-%20Add%20another%26nbsp%3B%3CSTRONG%3EVariables%20-%20Initialize%20variable%3C%2FSTRONG%3E%26nbsp%3Baction%20to%20initialize%20a%20variable%20of%20type%26nbsp%3B%3CSTRONG%3EInteger%3C%2FSTRONG%3E%26nbsp%3Bnamed%26nbsp%3B%3CSTRONG%3EreturnCount%3C%2FSTRONG%3E%2C%20the%20initial%20value%20is%20set%20to%20%3CSTRONG%3EZero%3C%2FSTRONG%3E.%20This%20variable%20will%20be%20holding%20the%20number%20of%20rows%20returned%20in%20each%20action%20call.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22talsaifi_0-1626425639586.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F296297i49675BEB2229787E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22talsaifi_0-1626425639586.png%22%20alt%3D%22talsaifi_0-1626425639586.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E4-%26nbsp%3BAdd%26nbsp%3B%3CSTRONG%3EControl%20-%20Until%3C%2FSTRONG%3E%26nbsp%3Baction%20with%20condition%20set%20to%20%3CSTRONG%3E%40less(variables('returnCount')%2C%20variables('topCount'))%3C%2FSTRONG%3E.%26nbsp%3BThis%20control%20will%20loop%20until%20the%20%3CSTRONG%3EreturnCount%3C%2FSTRONG%3E%26nbsp%3Bvariable%20value%20is%20less%20than%20%3CSTRONG%3EtopCount%3C%2FSTRONG%3E%26nbsp%3Bvariable%20value%20indicating%20that%20the%20final%20result%20is%20reached%20and%20no%20more%20items%20are%20available%20to%20return.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22talsaifi_0-1626433293840.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F296308i8DDA765B9EA35457%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22talsaifi_0-1626433293840.png%22%20alt%3D%22talsaifi_0-1626433293840.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%3E5-%20Inside%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EControl%20-%20Until%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eaction%2C%20add%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ESQL%20Server%20-%20Get%20rows%20(V2)%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eaction%20with%20its%20parameters%20set%20as%20follows%3A%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-indent-padding-left-30px%22%3E-%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ESkip%20Count%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20the%20integer%20value%20used%20to%20indicate%20the%20number%20of%20rows%20to%20skip%2C%20set%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EskipCount%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Evariable%20value.%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-indent-padding-left-30px%22%3E-%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ETop%20count%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20the%20string%20token%20used%20to%20indicate%20the%20result%20set%20to%20return%2C%20set%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EtopCount%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Evariable%20value.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22talsaifi_1-1626433622516.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F296309i8B8A193137C4D302%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22talsaifi_1-1626433622516.png%22%20alt%3D%22talsaifi_1-1626433622516.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-indent-padding-left-30px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%3E6-%20Turn%20on%20%3CSTRONG%3EPagination%3C%2FSTRONG%3E%26nbsp%3Bon%26nbsp%3B%3CSTRONG%3ESQL%20Server%20-%20Get%20rows%20(V2)%3C%2FSTRONG%3E%26nbsp%3Baction%2C%20following%20the%20steps%20below%3A%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-indent-padding-left-30px%22%3Ea.%20On%26nbsp%3Bthe%20top%20right%20corner%20of%20the%20action%2C%20click%20on%20the%20three%20dots%20(%3CSTRONG%3E...%3C%2FSTRONG%3E).%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-indent-padding-left-30px%22%3Eb.%20Select%20%3CSTRONG%3ESettings%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-indent-padding-left-30px%22%3Ec.%20Turn%20on%20%3CSTRONG%3EPagination%3C%2FSTRONG%3E%20setting.%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-indent-padding-left-30px%22%3Ed.%20Set%20%3CSTRONG%3EThreshold%3C%2FSTRONG%3E%20to%20the%20number%20of%20rows%20that%20you%20want%20the%20action%20to%20return%2C%20%3CSPAN%3Eset%20to%20%3CSTRONG%3E5000%3C%2FSTRONG%3E%2C%20for%20the%20purpose%20of%20this%20example%3C%2FSPAN%3E.%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-indent-padding-left-30px%22%3Ee.%20Click%20%3CSTRONG%3EDone%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22talsaifi_2-1626433910075.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F296310iF146F36512431DF0%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22talsaifi_2-1626433910075.png%22%20alt%3D%22talsaifi_2-1626433910075.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%22%3E%3CSPAN%3E7-%20Add%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EVariables%20-%20Increment%20variable%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Baction%20to%20increment%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EskipCount%26nbsp%3B%3C%2FSTRONG%3E%3CSPAN%3Ewith%20the%20value%20of%20the%20%3CSTRONG%3EtopCount%3C%2FSTRONG%3E%20variable%3C%2FSPAN%3E%3CSPAN%3E.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22talsaifi_0-1626426111588.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F296298i0C41CF17DF9AE3C1%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22talsaifi_0-1626426111588.png%22%20alt%3D%22talsaifi_0-1626426111588.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E8-%20Add%26nbsp%3B%3CSTRONG%3EVariables%20-%20Set%20variable%3C%2FSTRONG%3E%26nbsp%3Baction%20to%20set%26nbsp%3B%3CSTRONG%3EreturnCount%26nbsp%3B%3C%2FSTRONG%3Eto%20the%20number%20of%20rows%20returned%20by%20each%26nbsp%3B%3CSTRONG%3ESQL%20Server%20-%20Get%20rows%20(V2)%3C%2FSTRONG%3E%26nbsp%3Baction%20call.%20The%20value%20is%20set%20to%26nbsp%3B%3CSTRONG%3Elength(body('Get_rows_(V2)')%3F%5B'value'%5D)%3C%2FSTRONG%3E.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22talsaifi_1-1626426383581.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F296300i2D8C179EA5F189F8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22talsaifi_1-1626426383581.png%22%20alt%3D%22talsaifi_1-1626426383581.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EFinally%2C%20you%20can%20add%26nbsp%3B%3CSTRONG%3EControl%20-%20For%20each%3C%2FSTRONG%3E%26nbsp%3Baction%20to%20loop%20through%20the%20returned%20list%20of%20rows%20in%20each%26nbsp%3B%3CSTRONG%3EControl%20-%20Until%3C%2FSTRONG%3E%26nbsp%3Baction%20iteration%20to%20process%20them%20as%20required.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EFinal%20logic%20app%20workflow%20will%20look%20as%20follows%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22talsaifi_3-1626434248219.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F296311i076BFF06447FADA8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22talsaifi_3-1626434248219.png%22%20alt%3D%22talsaifi_3-1626434248219.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EFor%20SQL%20Server%20connector%20reference%2C%20check%20the%20following%20link%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fconnectors%2Fsql%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESQL%20Server%20-%20Connectors%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2552276%22%20slang%3D%22en-US%22%3E%3CP%3EPagination%20to%20return%20large%20list%20of%20items%20in%20Azure%20Logic%20App%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22talsaifi_2-1627635404148.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F299519i1C5D29379315051D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22talsaifi_2-1627635404148.png%22%20alt%3D%22talsaifi_2-1627635404148.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2552276%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELogic%20Apps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Aug 02 2021 06:12 AM
Updated by: