cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Meneghino
Level 10

How to supply a record parameter to Flow from PowerApps?

I am trying to supply a record as input to Flow from PowerApps, but failing.  Any help is most welcome.

 

In Flow it is possible to initialise a variable of Object type and get its input from PowerApps:

 

1.JPG

 

It is also possible to add the flow to a button, and a record type of parameter is requested and accepted. (Whereas this does not seem to work if you initialise a variable of array type)

 

2.JPG

 

However, when running the action, this record is received as blank in Flow.

3.JPG

 

Has anyone found now to make this work, or have any information on this?

 

The following may be interested in this issue:

 

@CarlosFigueira

@v-micsh-msft

@mr-dang@Mr-Dang-MSFT

@Anonymous

 

There is a similar discussion in the Flow community but there is no actual information or solution, the solution marked is not a reply to the question.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How to supply a record parameter to Flow from PowerApps?

Hi @Meneghino,

 

Do you want to pass a record value from your app to a flow (Microsoft Flow)?

 

Currently, a flow only accepts string values as input passed from an app. If you want to pass a record value from your app to a flow (Microsoft Flow), I afraid that there is no way to achieve your needs in PowerApps currently.

 

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, you could consider take a try to convert your record value into a string value, and then pass the string value to your flow.

 

I have made a test on my side, please take a try with the following workaround:

 

App configuration as below:1.JPG

 

Set the OnSelect property of the "Pass Record" button to following formula:

'20180911_case1'.Run(
Concat(
Table({ColumnA:123,ColumnB:"ABC"}),
ColumnA&","&ColumnB&"#"
)
)

Note: The {ColumnA:123,ColumnB:"ABC"} represents the record that you want to pass from your app to a flow.

 

Flow's configuration as below:2.JPG

 

3.JPG

 

Within the "Filter array" action, From field set to following formula:

split(outputs('Compose'),'#')

click "Edit in advanced mode", type the following formula:

@not(empty(item()))

Within the "Set variable" action, Name set to MyTestObject variable, Value field set to following formula:

{
  "ColumnA": @{first(split(item(),','))},
  "ColumnB": @{last(split(item(),','))}
}

 

the flow works successfully as below:4.JPG

 

 

In addition, please check and see if the following blog would help in your scenario:

https://www.techmikael.com/2017/05/saving-collection-of-images-from.html

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
AnthonyPhan
Level 8

Re: How to supply a record parameter to Flow from PowerApps?

In the past the way I pass records (and tables) to flow is using the Concat funcation to produce a CSV equivilent of the record (or table) as a long string. In flow I proceed to use split functions to convert the records (or table) into usable arrays. This method can be time consuming and so I am also quite interest in how we can to this better. 

PowerApps Staff CarlosFigueira
PowerApps Staff

Re: How to supply a record parameter to Flow from PowerApps?

I've had this scenario a while back, and I worked on it by creating a JSON object manually using the Concat function for collections (similar to what @AnthonyPhan did with CSV) and used the 'Parse JSON' action in Flow to break it apart.

 

There's a feature request in the PowerApps Ideas page at https://powerusers.microsoft.com/t5/PowerApps-Ideas/Add-JSON-stringify-or-something-similar-for-debu..., I recommend you to vote it up to bubble up its priority. I'd definitely want to see that.

Community Support Team
Community Support Team

Re: How to supply a record parameter to Flow from PowerApps?

Hi @Meneghino,

 

Do you want to pass a record value from your app to a flow (Microsoft Flow)?

 

Currently, a flow only accepts string values as input passed from an app. If you want to pass a record value from your app to a flow (Microsoft Flow), I afraid that there is no way to achieve your needs in PowerApps currently.

 

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, you could consider take a try to convert your record value into a string value, and then pass the string value to your flow.

 

I have made a test on my side, please take a try with the following workaround:

 

App configuration as below:1.JPG

 

Set the OnSelect property of the "Pass Record" button to following formula:

'20180911_case1'.Run(
Concat(
Table({ColumnA:123,ColumnB:"ABC"}),
ColumnA&","&ColumnB&"#"
)
)

Note: The {ColumnA:123,ColumnB:"ABC"} represents the record that you want to pass from your app to a flow.

 

Flow's configuration as below:2.JPG

 

3.JPG

 

Within the "Filter array" action, From field set to following formula:

split(outputs('Compose'),'#')

click "Edit in advanced mode", type the following formula:

@not(empty(item()))

Within the "Set variable" action, Name set to MyTestObject variable, Value field set to following formula:

{
  "ColumnA": @{first(split(item(),','))},
  "ColumnB": @{last(split(item(),','))}
}

 

the flow works successfully as below:4.JPG

 

 

In addition, please check and see if the following blog would help in your scenario:

https://www.techmikael.com/2017/05/saving-collection-of-images-from.html

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 417 members 6,625 guests
Please welcome our newest community members: