Power Automate skip() Function + Examples

This tutorial will help you to know how to use the skip() function in Power Automate to remove the items from an array. Here, I will guide you through everything related to the Power Automate skip function.

You can dive into the examples:

  • What is a skip() function in Power Automate
  • Power Automate skip() function syntax
  • How to skip the first item in an array in Power Automate
  • Remove multiple items from an array with Power Automate
  • How to remove the last item in a array using Power Automate skip() expression
  • Use Power Automate skip() expression to remove characters in the SharePoint list

Power Automate skip() function is used to skip a specified number of elements/characters from the beginning of an array or string and return the remaining elements/characters.

Power Automate skip() Function

Using the skip() function in Power Automate, a user can remove the items from the beginning of an array and get the output of all the remaining items.

The Power Automate skip() function works oppositely to the Power Automate take() function.

Example:

Suppose take an array as listed in the table below. To remove the first elements of an array, one may use the ‘skip()’ function in Power Automate. The function will return the output as:

InputOutput
[“10000”, “20000”, “30000”][“20000″,”30000”]

Refer to the image presented below.

Power Automate skip first item in array

This is a brief description of the Power Automate skip() function.

Power Automate skip() Function Syntax

Here, I will show the Power Automate skip() function syntax.

skip('<collection>', <count>)
skip([<collection>], <count>)

Input Parameters:

  • Collection: It should be an array or a string from where you want to remove the items/characters.
  • Count: The number of items or elements that should be removed from the beginning of a string or an array.

Return value:

The power Automate skip() function will give the output of the remaining elements or items that are present in an array.

This is how to give the syntax format for skip() function in Power Automate.

Power Automate skip() Multiple items in Array

Now, I will show you how to skip multiple items of an array using the Power Automate skip() function.

Example:

I will take an array [“Tom Ellis”, “Ella Lopez”, “Elena Gilbert”, “Paul Wesley”, “Lynne Robbins”]. I wanted to exclude the first three elements from this array.

By using the skip() expression, the output will be [“Paul Wesley”, “Lynne Robbins”]. Refer to the below image.

How to use skip() function in Power Automate

Follow the step-by-step instructions to achieve this:

1. Navigate to https://make.powerautomate.com to open your Power Automate home page -> Click on + Create -> Select an Instant Cloud Flow and assign a name to it -> Choose the trigger’s flow “Manually trigger the flow” and click on the Create button.

2. Next, add the Initialize variable flow action to create and set the initial value and set the required field value.

  • Name: Provide the name of the variable.
  • Type: Select the type of the variable as Array.
  • Value: Here, I have given an array [“Tom Ellis”, “Ella Lopez”, “Elena Gilbert”, “Paul Wesley”, “Lynne Robbins”].
Power Automate skip() function expression

3. Add the ‘Compose’ flow action to set the expression to skip the elements.

  • Inputs: Select field -> Select Expression -> Insert the expression -> Click on OK.
skip(variable('Team Members'), 3)
How to use the skip function expression in Power Automate
  • skip(): This is the skip function, which is used to skip a specified number of elements from the beginning of an array or characters from the beginning of a string.
  • variables(): This represents the variable that presumably contains an array or a string.
  • Team Members: Name of the initialized variable.

4. Now, it’s time to Save and Test -> Click on Save -> Test it Manually -> Then expand the compose flow action to display the output below.

How to use the skip function expression in Power Automate

This is how to use the skip() function to remove multiple elements from an array in Power Automate.

Power Automate Skip() Last item in Array

Usually, the Power Automate skip() function will only remove items from the front of the collection. But, we can also remove the last item of a collection with the combination of skip() function and reverse() function.

Now, I will show you how to remove the last item in an array.

Go through the steps below:

1. Follow the above steps to initialize the array variable with the values.

Power Automate skip last item in array

2. Take the Compose flow action and provide the expression for the skip() function to eliminate the last item of an array.

Inputs: Select field -> Click Expression -> Insert the code below.

reverse(skip(reverse(variables('Name')),1))

Note:

The power Automate reverse() function will reverse the order of items so that the skip() function will remove the first() item. I have again used the reverse() function to restore the same order by removing the last item.

After giving the expression, Click OK.

Power Automate remove last item from array

3. Now, it’s time to save the flow. After saving, click on Test -> Select Manually -> Tap on the Test button.

4. You can see the image below, which will display a collection of an array, removing the last item from it.

  • Output: Array with Tom Ellis and Ella Lopez.
Power Automate how to remove last item in a array

This is how to use the Power Automate skip() function to remove the last item from an array.

How to use Power Automate skip() Expression [SharePoint list]

This section will show how to use the Power Automate skip() function expression in an Automated cloud flow.

In this case, we will see an example of a string variable using the Power Automate skip() function expression.

Example

I have used a SharePoint list named “Track Project Deadline,” which comprises various columns, each with a different data type, as shown below.

ColumnsData Types
Title (renamed as Project Name)Single line of text
Project Assigned ToPerson and Groups
Project Deadline DateDate and Time
Project StatusChoice
Power Automate skip() function format

Now, my requirement is to remove the first 3 characters from a SharePoint list column[Project Name] value.

Using the Power Automate skip() function, the output of the string value will be “IT Infrastructure Upgrade,” i.e., Infrastructure Upgrade.

Refers to the image presented below.

skip() function in Power Automate

To work around this, follow the steps below.

1. Open the Power Automate home page, click + Create -> Select the Automate cloud flow and assign the flow name -> Choose your trigger’s flow (When an item is created or modified).

Set all the required details for this trigger as shown below.

  • Site Address: Provide the specific SharePoint site address.
  • List Name: Choose the name of the SharePoint List from the drop-down.
Power Automate skip() function expression using SharePoint List

2. Add the ‘Initialize variable’ flow action to create and set the initial value and set the required details.

  • Name: Enter the name of the initialized variable.
  • Type: Choose the type of the variable as String.
  • Value: I have given the value as Title (renamed as Project Title) from the dynamic content.
Power Automate skip() function expression

3. Next, add the ‘Compose’ flow action to set the expression for skipping the characters as per the scenario.

  • Inputs: Select field -> Select Expression -> Insert the below expression-> Click on OK.
skip(variables('Project Title'), 3)
  • skip(): This is the skip function, which is used to skip a specified number of characters from the beginning of a string.
  • variables(): This represents the variable that presumably contains an array or a string.
  • Project Title: The SharePoint list item value is taken in the Project Title column.
Microsoft Power Automate skip() function

4. Once the flow is created -> Click on Save and Test -> Then test it Manually -> Then expand the compose flow action, it will display the output.

Refers to the image shown below.

How to use skip() expression in Power Automate

This is how to use the skip() function in Power Automate using SharePoint List.

Conclusion

I hope this Power Automate tutorial helps you to understand how the skip() function works. You may also learn about the Power Automate skip() function. Here, I have explained the following things:

  • Power Automate how to skip the first item from an array
  • Power Automate remove multiple items from an array
  • How to remove the last item in an array using the Power Automate skip() function
  • Example on Power Automate skip() function using a SharePoint list.

Also, you may like some more Power Automate tutorials: