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...
How to use "Do Until" in a flow?
PRE - REQUISITE
- Login to Power Automate
- Create a manually triggered cloud flow
DO UNTIL is a looping technique where a block of code/actions can be repeated until a condition is met and stopped once the condition is no longer met.
For this flow, I will be using a variable with type integer. Here's a link, if you would like to review "Integer Variable"
BUILDING THE FLOW - DO UNTIL IN POWER AUTOMATE
STEP 1: Create an integer variable and set default value as 0.
STEP 2: Add Do until, select the variable, select "is greater than" and give the value 10.
We are looping through the actions within this block until the condition "value of the variable is greater than 10" is met. Once the value touches 11 [as 11>10], the loop is exited.
[Note: The block of actions is executed first, then the condition is checked]
STEP 3: Now we add the block of action that has to be repeated. In this case, I will increment the variable by 1.
STEP 4: I also added a compose action at the end to know the value of the variable after incrementation.
TEST THE FLOW
Notice that the last value of the variable is 11. The Do Until loop has looped 11 times, each time the value of the variable incremented by 1.
That was a a quick one!😉
Please leave a comment if you have queries.
Comments
Post a Comment