Return an array from a PowerAutomate to PowerApps (Split Method without Premium)


Basically, there are already some posts and videos on this topic. However, I would like to point out a great post incl. app for generating the function. (by Brian Dang)

You can find the complete tutorial under this link:

Below you will find a shortened version.
As already written, Brian Dang has not only provided a detailed tutorial for us in the linked post but also a downloadable PowerApp to generate the code.

Download the App: https://aka.ms/splitarray

Preparation in the flow (PowerAutomate)

Parsing the Array in PowerApps

Following text copied from: https://powerapps.microsoft.com/en-us/blog/return-an-array-from-a-sql-stored-procedure-to-powerapps-split-method/

Open an existing app or create a blank one to test out your flow.

As mentioned before, you can download an app for generating a formula that can split the text string from Flow back into an array.

  • Open another instance of the Power Apps Studio.
  • Click File, then Open.
  • Browse for the msapp file that you downloaded.

When the app opens, fill out the text boxes with details for your app:

  • Name of your flow: include single quotes if your flow’s name would require them.
  • Name of text field returned from flow: the name of the field you chose in the last step of your flow.
  • Name of variable for flow response: the name of a variable that will be receiving the string from the flow.
  • Name of collection for records: the name of the collection that will be the array you use throughout the app
  • Delimiter from join: the delimiter you chose for the Join step in your flow.

Click ‘+ New column’ to add the column names in your app. Use the drop down menu beside each column to determine its type. This tool is limited to only strings, numbers, and Boolean values.


The Big 5 (Variables / Parameters) in PowerApps

Photo by Ann H on Pexels.com

If you create a PowerApp and look around on the internet for solutions, you will come across the following functions from time to time.

  1. set()
  2. updateContext({})
  3. with()
  4. navigate(…,…,PARAMETER)
  5. param()

In the following I will show you briefly what I use them for and why you should think about using them too.

  1. set() function
    This is probably the best known function of all. It sets the value of a global variable. Global variables are useful when you want to store a value and use it on different screens. This can be used in the OnStart, where you set style variables, the logged in user or if you select an element from a gallery and want to use this element somewhere else.


  1. updateContext({})
    This is the little brother of the Set function. Sets the value of one or more context variables of the current screen. I mainly use this when I want to change a value (true,false) to show/hide something for example. Mostly a pop-up or another input window.

    Here I set the variable “locPopUp” first to “true” and then again to “false”.

UpdateContext({locPopUp: true});
UpdateContext({locPopUp: false})

  1. with({})-function
    This function I discovered some time ago and is again the little brother of UpdateContext. Here “variables” are stored exclusively for a function and can only be referenced in this function. I use this mainly within functions, as soon as I have to use a certain function several times.

    In this example I write the variable “locText”, to which I then reference 2x in the further course of the function. Important: the With function is closed only at the end of all functions.

{locText: TextInput1.Text},

  1. navigate(…,…,{PARAMETER})
    This parameter was unknown to me for a long time, because I usually stopped after the first comma and closed the parenthesis. But if you put two more commas after the Navigate, you can pass one or more parameters to the screen you want to navigate by using the curly braces. This parameter is then only available on the following screen. (unless you write it into another variable or pass this value again)

    In this example I pass to Screen1 the parameter “locVariableNextScreen” with the text “Yes we can use it”.

{locVariableNextScreen: “Yes we can use it”}

  1. param()
    This provides access to parameters passed to the app when the user has it open. This parameter is usually used less often, as this is exclusively appended to the app’s URL. Thus it is possible to navigate the user to a certain page or to pass certain values to the app.

    Here I pass the parameter “Admin” with the value “true” in the URL. In OnStart I then set the global variable “varAdmin” with the parameter “true”. So I can enable additional settings for an admin, using this parameter. (Visible: varAdmin)



Extra tip: If you use a variable and want to use it as a boolean, which is always the opposite of the current state, use the “!” in front of the variable. This reverses the value.

This example reverses the value every time it is executed. If is currently true, it will be changed to false and vice versa.

UpdateContext({locPopUp: !locPopUp})


Power Apps change the app owner with PowerAutomate

In the post of 2020-12-09 I showed the video of Shane Young, where it is shown how to change the AppOwner using PowerShell. However, there is another, perhaps even easier way to change the AppOwner. Using PowerAutomate.

Why should I change the owner of the app, which is the creator? One of the reasons that comes to mind is that the person has left the company, or you want to transfer all apps to one account.

Here is the short tutorial on how to change the AppOwner of PowerApps using PowerAutomate.

Here you can see the simple structure of a flow, which is triggered manually.

Next, the new AppOwner is searched for in the action “Search for user”. Make sure that this is unique and that only one user is found.

Then use the action “Set App Owner” and fill in the fields. Under Environment Name you can get the ID from the URL above. (2. on the picture below) The same applies to the PowerApp name. Just insert the App ID here. (1. on the picture below)

Finally insert the ID that comes from the action “Seach for user” and the AppOwner will be changed. (if you have the permissions)


How to track the current progress of a flow in the PowerApp

In some scenarios i or the user would like to see how far the Cloud Flow Process (PowerAutomate) is already after I started it via PowerApps.

Unfortunately it is not possible to use “Respond to PowerApps” multiple times to show me a status update in the PowerApp.

For this we can easily create a StateLog table and check it regularly via timer. Of course, it is important that we send an update to the StateLog entry after milestones in the flow. However, it is also possible that you do not update the entry as in the solution here, but that you create a new entry each time. this gives you other display options in the app.

Here you can download the solution and use it at your place.

What you need in your app for the implementation

  • Flow Trigger -> here button
  • Timer -> to refresh the Data
  • something to show the state -> here text & icons
  • List to write the State -> here SharePoint

Build a datasource with three columns

Here I use the default column “Title”, a text column GUID” (so I can filter by it later) and a number column “StateCode” (so I can do certain things later based on the StateCode)

create a flow in the similar format

It is important that the trigger is followed immediately by the “Create Item”. There you create an entry in the StateLog with the GUID (which you generate and transfer via PowerApp) and of course the StateCode with a naming of the status.

The scopes with the name “Flow Actions” are only symbolic. you can use any actions there. as soon as an important milestone is reached, you simply update the status (or create an additional entry in the statelog -> depending on the desired solution).

You can find the code to copy and paste the flowactions at the end of this post.

create your app

1. the trigger of the flow.
Here the flow is attached. I use here with “OnSelect” the function to store a GUID in a variable and then pass this GUID to the flow.

//generate GUID for selection
//start Flow

2. The timer
I use this to check the status in regular intervals (here duration 3000ms -> 3sec).

I have the following settings stored with me:

  • AutoStart: ‘!IsBlank(varStateGUID)’.
  • Repeat: ‘locCurrentState.StateCode<>3’ (variable is set OnTimerEnd)
  • Refresh(StateLog);UpdateContext({locCurrentState: LookUp(StateLog,GUID=Text(varStateGUID))})

In the last step mentioned above I refresh the data source and then read the current state via lookup and the GUID variable we created in step 1 and save it via updatecontext.

3. + 4. display of the status
here i chose the simple variant by displaying the status text. but it is also possible to display icons or other elements depending on the status code.


{"id":"5d6770c8-725f-42a0-86a9-a13cc239d868","brandColor":"#8C3900","connectionReferences":{"shared_sharepointonline":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-2e2e173e-f314-4d56-afe3-20f134d359a6"}}},"connectorDisplayName":"Control","icon":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KIDxwYXRoIGQ9Im0wIDBoMzJ2MzJoLTMyeiIgZmlsbD0iIzhDMzkwMCIvPg0KIDxwYXRoIGQ9Im04IDEwaDE2djEyaC0xNnptMTUgMTF2LTEwaC0xNHYxMHptLTItOHY2aC0xMHYtNnptLTEgNXYtNGgtOHY0eiIgZmlsbD0iI2ZmZiIvPg0KPC9zdmc+DQo=","isTrigger":false,"operationName":"LogState","operationDefinition":{"type":"Scope","actions":{"Create_item_-_Flow_started":{"type":"OpenApiConnection","inputs":{"host":{"connectionName":"shared_sharepointonline","operationId":"PostItem","apiId":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline"},"parameters":{"dataset":"https://lehmannws.sharepoint.com/sites/lehmann.ws","table":"5fe8a63f-d26b-419e-a693-6687f7275ebf","item/Title":"Flow started","item/GUID0":"@triggerBody()['text']","item/StateCode":0},"authentication":"@parameters('$authentication')"},"runAfter":{},"metadata":{"operationMetadataId":"158862e4-3942-4c31-bcfb-023af6fa6179"}},"Flow_Actions_-_First_Block":{"type":"Scope","actions":{"Delay":{"type":"Wait","inputs":{"interval":{"count":5,"unit":"Second"}},"runAfter":{},"metadata":{"operationMetadataId":"061f09c0-5fc1-4490-96c3-a61a5ff64ca1"}}},"runAfter":{"Create_item_-_Flow_started":["Succeeded"]},"metadata":{"operationMetadataId":"457a1895-9a60-49ce-8833-c1e66425d566"}},"Update_item_-_first_actions_carried_out":{"type":"OpenApiConnection","inputs":{"host":{"connectionName":"shared_sharepointonline","operationId":"PatchItem","apiId":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline"},"parameters":{"dataset":"https://lehmannws.sharepoint.com/sites/lehmann.ws","table":"5fe8a63f-d26b-419e-a693-6687f7275ebf","id":"@outputs('Create_item_-_Flow_started')?['body/ID']","item/Title":"first actions carried out","item/GUID0":"@triggerBody()['text']","item/StateCode":1},"authentication":"@parameters('$authentication')"},"runAfter":{"Flow_Actions_-_First_Block":["Succeeded"]},"metadata":{"operationMetadataId":"61ca671e-ef33-44ea-b22c-932b9468b964"}},"Flow_Actions_-_Second_Block":{"type":"Scope","actions":{"Delay_2":{"type":"Wait","inputs":{"interval":{"count":5,"unit":"Second"}},"runAfter":{},"metadata":{"operationMetadataId":"c0e22d53-063c-480c-8a6b-791726629a4b"}}},"runAfter":{"Update_item_-_first_actions_carried_out":["Succeeded"]},"metadata":{"operationMetadataId":"2a256fed-8839-4ca6-b209-0c54c798bde5"}},"Update_item_-_second_block_of_actions_completed":{"type":"OpenApiConnection","inputs":{"host":{"connectionName":"shared_sharepointonline","operationId":"PatchItem","apiId":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline"},"parameters":{"dataset":"https://lehmannws.sharepoint.com/sites/lehmann.ws","table":"5fe8a63f-d26b-419e-a693-6687f7275ebf","id":"@outputs('Create_item_-_Flow_started')?['body/ID']","item/Title":"second block of actions completed","item/GUID0":"@triggerBody()['text']","item/StateCode":2},"authentication":"@parameters('$authentication')"},"runAfter":{"Flow_Actions_-_Second_Block":["Succeeded"]},"metadata":{"operationMetadataId":"1fa400b7-cf16-4270-8cc9-a8cf3b2a7e56"}},"Flow_Actions_-_Third_Block":{"type":"Scope","actions":{"Delay_3":{"type":"Wait","inputs":{"interval":{"count":5,"unit":"Second"}},"runAfter":{},"metadata":{"operationMetadataId":"e27fb99e-cf28-4ad2-8027-55566bed620f"}}},"runAfter":{"Update_item_-_second_block_of_actions_completed":["Succeeded"]},"metadata":{"operationMetadataId":"56369547-1b13-475b-b0e0-527f43ecd247"}},"Update_item_-_Flow_finished_-_third_block_processed":{"type":"OpenApiConnection","inputs":{"host":{"connectionName":"shared_sharepointonline","operationId":"PatchItem","apiId":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline"},"parameters":{"dataset":"https://lehmannws.sharepoint.com/sites/lehmann.ws","table":"5fe8a63f-d26b-419e-a693-6687f7275ebf","id":"@outputs('Create_item_-_Flow_started')?['body/ID']","item/Title":"Flow finished - third block processed","item/GUID0":"@triggerBody()['text']","item/StateCode":3},"authentication":"@parameters('$authentication')"},"runAfter":{"Flow_Actions_-_Third_Block":["Succeeded"]},"metadata":{"operationMetadataId":"4b93bd92-88af-4610-9c23-340d5f872f7b"}}},"runAfter":{}}}

Run Power Apps connections with elevated permissions via Power Automate | Impersonate flow actions from Reza Dorrani

Reza Dorrani shows here how you can create entries as an end user without sufficient permissions. So far, I had always solved this via child flow, but now this is possible directly.

You can see this video here on my blog because I have rated this video with 5 stars in my Youtube video library. This video was automatically posted using PowerAutomate.

Power Apps Number Functions Beginners Tutorial from Rory Neary

Great overview of the number functions in the PowerApps. Especially mod in combination with a gallery, where you can adjust the color of each line, I find very exciting.

You can see this video here on my blog because I have rated this video with 5 stars in my Youtube video library. This video was automatically posted using PowerAutomate.

Add Responsive Design to your Power Apps | Make existing Canvas Apps Responsive from Reza Dorrani

Exactly such a video I needed – because it is often the case that we have built an app that is not responsive. With these simple steps, we can migrate our app and get the most out of it on all devices.

You can see this video here on my blog because I have rated this video with 5 stars in my Youtube video library. This video was automatically posted using PowerAutomate.

Fill and Sign a Word Document with Power Apps and Power Automate without using any premium actions from Paulie M

Simply convert a Word into a zip file, replace the data a little and convert it back into a zip file -> Ingenious way to create a Word file without premium connectors.

You can see this video here on my blog because I have rated this video with 5 stars in my Youtube video library. This video was automatically posted using PowerAutomate.

How to implement onKeyDown or onKeyPress behaviour in a PowerApps Text Input from Paulie M

Ingenious. I haven’t used the slider much so far, but it would make sense to “repurpose” it as well as the toogle (which I often use to start querying by change default).

You can see this video here on my blog because I have rated this video with 5 stars in my Youtube video library. This video was automatically posted using PowerAutomate.

Deliver documents, collect payments and communicate with customers all with Microsoft Power Automate from Paulie M

Amazing. I am still overwhelmed by the functionality of powerautomate or how Paulie uses it. He shows here in a seemingly simple way how you can send the invoices with your customers via HTTP trigger and capture their response.

You can see this video here on my blog because I have rated this video with 5 stars in my Youtube video library. This video was automatically posted using PowerAutomate.

Upload Multiple Files from #PowerApps to #SharePoint directly without the use of #PowerAutomate from Paulie M

With the “new” function Office365Groups you can make file-uploads from the PowerApp via Http request.

Thus, one is no longer bound to the transfer to PowerAutomate and its processing.

You can see this video here on my blog because I have rated this video with 5 stars in my Youtube video library. This video was automatically posted using PowerAutomate.

Power Apps Form Validation 👍 (Tutorial) from Dawid van Heerden

A great overview and summary of how to easily customize and validate a form.

You can see this video here on my blog because I have rated this video with 5 stars in my Youtube video library. This video was automatically posted using PowerAutomate.