POWER AUTOMATE DESKTOP - DATABASE Pre-Requisites Power Automate Desktop Access to database Under the database action, we have only three sub actions, namely: Open SQL connection Execute SQL statement Close SQL connection Open SQL Connection The first step is to connect to the database. So, we will use the Open SQL connection action and provide a connection string to establish the connection (the connection string in the video is a sample). When the connection is successful, the connection details is stored in a variable during execution. Execute SQL statement This action can be used to execute SQL queries. Here, I am using select query and the result is stored in a variable of type datatable. Close SQL connection It is a best practice to always close the database connection once the required queries are executed. YAY! BONUS!😮 How to execute a stored procedure using database action? Stored Procedure without arguments Stored Procedure with arguments (Comma separated in...
ARRAY VARIABLES
A variable is a storage space where we can store any type of value. Here, we are gonna explore how to store & access Array variables.
To understand how array variables work, let's use this example of an array:
["FRIENDS", "Money Heist", "Squid Game", "The Big Bang Theory", "Brooklyn 99"]
PRE-REQUISITE
- Please log-in to Power Automate or Power Platform with your Work-School account
Let's get started!
STEP 1: Create an Instant Cloud Flow with a Manual Trigger.
STEP 2: Click on "+New Step". Search and select "Variable".
STEP 3: To create a variable, select "Initialize Variable".
Name: ShowsArray
Type: Array
Value: ["FRIENDS", "Money Heist", "Squid Game", "The Big Bang Theory", "Brooklyn 99"]
STEP 4: Click on "+New Step". Search and select "Append to array variable".
STEP 5: Select the Array variable and also add a value to be appended.
Name: ShowsArray
Value: Lucifer
In new step, search and select "Compose". In Inputs, select "ShowsArray" from the dynamic content.
STEP 7: It's time to iterate through each item in the array.
In a New Step, Search "Control" and Select "Apply to each".
Since the Index of array starts from 0, the Index 2, gives us the 3rd value in the Array.
Formula sort a look like this: variables('variablename')[n]
It's time to save and test the flow and see how it works!
We can expand each action to see the results of variable.
Screenshots of the Tested Flow
That concludes Array variable!
Please reach out or leave a comment in case of doubts, and I will get back asap.
Comments
Post a Comment