cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Community Champion
Community Champion

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
Highlighted
Community Support
Community Support

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
Kudo Commander
Kudo Commander

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. 

Highlighted
Power Apps
Power Apps

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.

Highlighted
Community Support
Community Support

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
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,080)