Skip to main content

Notifications

Power Automate Fundamentals # 44: Usage of Skip Function in Power Automate

Power Automate Fundamentals # 44: Usage of Skip Function in Power Automate

 

Introduction:

In Power Platform, at times we must skip few elements from an Array or few characters from a given strings. In these scenarios, Skip function in Power Automate can be used.As an example Employees String Array and Employee Name String variables are used to explain this behaviour.

 

Step 1:

Login to the required Power Apps environment using URL make.powerapps.com by providing username and password and click on Flows on the left-hand side as shown in the below figure.

codevenkat_0-1641576575490.png

 

 

Step 2:

After Step 1, Click on New Flow and select instant cloud flow and provide the trigger as Manually trigger a flow and click on Create as shown in the below figure.

codevenkat_1-1641576589388.png

 

Step 3:

After Step 2, name the flow as Skip  Function and take a parallel branch and one side of branch take an initialize variable and name it as Set Employees Array and provide values

Name: Employee Names

Type: Array

Value: ["Venkat","Polisetty","Subba Rao"]

as shown in the below figure.

codevenkat_2-1641576600974.png

 

Step 4:

After Step 3, to the other side of  parallel branch take another initialize variable and name it as Set Employee Name and provide values

Name: Employee

Type: String

Value: VenkataSubbaraoPolisetty

as shown in the below figure.

codevenkat_3-1641576611864.png

 

 

Step 5:

After Step 4, now under Set Employees Array step take a compose action and name it as Get Employee Details With Skip Function and provide the inputs with skip  function which Returns the elements in the array starting at index Count syntax

skip(collection: array, count: integer)

as

Inputs : skip(variables('Employee Names'),2)

 

as shown in the below figure.

codevenkat_4-1641576623281.png

 

Step 6:

After Step 5, now under Set Employee Name take a compose action and name it as Get Employee Name With Skip Function and provide the inputs as

Inputs : skip(variables('Employee'),7)

 

as shown in the below figure.

codevenkat_5-1641576633365.png

 

Step 7:

After Step 6, save and test the flow and observe the results as shown in the below figure.

codevenkat_6-1641576642398.png

 

 

Note:

  1. Make sure to save and run the flow whenever you try expressions.
  2. Make sure to provide input array in proper acceptable format of string array.
  3. Also use double quotes for the elements in the array.

 

 

Conclusion: In this way we can use skip function in power automate to achieve customer functionality.

Comments

*This post is locked for comments