Power Automate Skip Function

In this Power Automate tutorial, we will learn the Power Automate skip function and how to use the skip function in Power Automate with different examples.

Here, we will see two examples by using the skip function; in one example, we will get all items from SharePoint and save them in an array variable. In another example, we will store all the values in the string Variable.

What is the Skip function in Power Automate?

The Power Automate skip function trims a set of items from the start of an array and returns the remaining items. In the same way, the skip function is also used to trim a set of characters from the start of a string and returns the remaining characters.
The below code is the syntax of the skip function in Power Automate:

skip(collection: array, count: integer)

Where,

  • skip is a function name
  • Collection and Count, both are required input parameters.

Follow the complete tutorial to learn how to use the skip function in a power automation flow:

How to use the skip function in Power Automate

Let us see how to use the skip function in Power Automate flow.

Example-1: (Variable array)

In this example, we are going to use the below SharePoint list. Consisting of,

  • EmployeeID – default title column
  • EmployeeName – Text data type
  • EmployeeStatus – Choice data type
How to use the skip function in Power Automate flow

Step-1:

Create an instant cloud flow, enter the flow name, and provide the trigger as Manually trigger a flow and click on Create button.

How to use the skip function in Power Automate

Step-2:

Add +new step and select get items action from action triggers. Then, Configure the SharePoint site address and List name.

Example to use the skip function in Power Automate flow

Step-3:
Select +New step and add initialize array variable Enter the variable and choose the variable type as an array.

Skip function in Power Automate

Step-4:

Add an apply to each control and pass the value to loop through and get all the Employee Names from the SharePoint list.

Skip function in the Power Automate flow

Then select Append to an array variable, in the form section select the initialized array variable name from the dropdown. In the Value pass the dynamic content Employee Name.

Power automate skip function

Add a compose data operation and pass the dynamic content variable value, which displays all the Employee names from the SharePoint list in an array format.

Power automate skip function example

Step-5:

Add a new compose data operation and Pass the below expression, which skips the first two EmployeeNames and returns the remaining values.

skip(variables('EmployeeNames'),2)
How to use the skip function in the Power Automate flow

Step-6:

  • Save and run the flow by selecting the Run flow option. Once flow ran successfully like below: We can see in the compose action output section it skips the first two values and returns the remaining values.
How to use skip function in the Power Automate

This is how to use the skip function for an array of values in the Power Automate flow.

Example-2: (Variable String)

Here also, we will use the same SharePoint list, used in the previous example to retrieve the employee names and store them as a string value.

Step-1:

Follow Step1 and Step 2 from the previous example to create a flow and get all the items from the SharePoint list.

Step-2:

Select the +New step and add initialize array variable. Enter the variable and choose the variable type as a String.

Skip function in Power Automate flow

Step-3:

Add an apply to each control and pass the value to loop through and get all the Employee Names from the SharePoint list.

Skip function in the Power Automate flow

Then select Append to String variable; in the form section, select the initialized array variable name from the dropdown. In the Value pass, the dynamic content Employee Name.

Skip function in Power Automate flow example

Add a compose data operation and pass the dynamic content variable value, which displays all the Employee names from the SharePoint list in a String format.

Skip function in the Power Automate flow example

Step-5:

Add a new compose data operation and Pass the below expression, which skips the first four characters in a string and returns the remaining string characters.

skip(variables('EmpName'),4)
How to use the skip function in the Power Automate

Step-6:

Save and run the flow by selecting the Run flow option. Once flow ran successfully like below: In the compose action output section it skips the first four characters and returns the remaining string characters.

How to use skip function in Power Automate flow

This is how to use the skip function for a string in the Power Automate flow.

In this Power Automate tutorial, we have learned the skip function and how to use the skip function in Power Automate with different examples.

You may also like:

>