The Power Automate Skip function trims a specified quantity of items from the beginning of a collection and returns the remaining items.
The skip function does the opposite of the take function.
In this article, I’ll introduce you to the skip function and will provide a step-by-step guide on how to use the function in a Microsoft flow.
Power Automate Skip Function
Power Automate Skip Function
The Power Automate Skip function returns a modified collection by removing a specified number of elements from the start and returning the remaining elements.
Syntax
skip([<collection>], <count>)
Input parameters
- collection (mandatory): The collection that you want to remove items from the beginning.
- count (mandatory): The number of items that should be removed from the beginning of the collection..
Return value
- Returns the given collection without the removed items at the beginning of the collection.
Power Automate Skip Expression Example
// skip the first two elements
skip(createArray(1,2,3,4,5),2)
=> 3,4,5
// reference a variable in a skip expression
skip(variables('myCol'),2)
How To Use The Power Automate Skip Function
Follow the steps to use the Power Automate Skip function in a flow.
-
Create a new flow with trigger ‘Manually trigger a flow’
New flow
-
Add a new step by clicking on ‘+ New step’
Add a new step
-
Search for ‘initialize’ and click on ‘Initialize variable’
Add Initialize variable action
-
Setup Initialize variable: 1) Provide a name, 2) select type Array, 3) Set value to ‘[1,2,3,4,5]’
Setup variable
-
Add a compose step by searching for ‘compose’ and clicking on ‘Compose’
Add Compose action
-
Setup compose action: 1) click into Inputs (popup appears), 2) click on ‘Expression’, 3) set expression to ‘skip(variables(‘myCol’),2)’ 4) click on ‘OK’
Setup skip expression in Power Automate
-
Save and do a test run
Result test run – Power Automate skip function example