cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MorePowerBI
Frequent Visitor

Sending power apps form input to power automate flow

I'm creating a sharepoint document library power apps form that users can interact with to submit new issues. The library consists of a variety of standard (text, date) and complex (choice) data type fields. When I'm connected to the library from power apps, I'm presented with the "DataCardValue#" element for each of the library columns but I'm not sure how to extract the values that are entered/selected.

 

First image is my power apps with the OnSelect Run formula for the power automate action button. As you can see from the formula, I'm not sure what I'm doing.

MorePowerBI_0-1630127680893.png

 

The second image is the flow and the parameters it's waiting on from the powerapp. The intent is that have the flow capture the values from the powerapp and send these over to a newly generated word document (not shown in the flow). This piece works fine. I just need to find a way to bridge the gap.

MorePowerBI_1-1630127723493.png

 

Help is greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
MorePowerBI
Frequent Visitor

I figured it out.

 

NCEForm.Run(

DataCardValue5.Selected.Value,

Text(DataCardValue1.SelectedDate, "yyyy-mm-dd"),

DataCardValue6.Text,

DataCardValue7.Selected.Value,

DataCardValue11.Text,

DataCardValue32.Text,

DataCardValue26.Selected.Value,

IF(

ISBLANK(DataCardValue2.SearchText),

DataCardValue2.Selected.Value, DataCardValue2.SearchText)

),

IF(

ISBLANK(DataCardValue3.SearchText),

DataCardValue3.Selected.Value, DataCardValue3.SearchText)

),

DataCardValue33.Text,

DataCardValue34.Text,

DataCardValue28.Selected.Value,

DataCardValue21.Selected.Value

)

 

The Date column requires reformatting so I needed to update the date value using Text(DataCardValue.SelectedDate, "yyyy-mm-dd")

For Choice columns with a fixed drop-down, I used DataCardValue.Selected.Value.

For Choice columns with the fill-in option enabled, I used

IF(

ISBLANK(DataCardValue.SearchText),

DataCardValue.Selected.Value, DataCardValue.SearchText)

)

View solution in original post

8 REPLIES 8
SharePointDev12
Helper I
Helper I

I recommend you to use the Powerapps v1 trigger instead of v2, initialize variable action for each column, and select Ask in Powerapps in the dynamic value popup. Pass the values from PowerApps according to the order of variables initialized in the flow.

SharePointDev12_1-1630129918646.png

 

SharePointDev12_0-1630129874782.png

 

I don’t have issues with the flow. I’m having issues with the OnSelect formula, so the first image. I’m not sure how to code the OnSelect function on the check mark so that when the user clicks it, the system sends the form answers to the flow/

Ashwin7104
Responsive Resident
Responsive Resident

Hey @MorePowerBI - Those dropdowns, I believe, should only allow a single value. In that instance, SelectedItems should be replaced by Selected.Value. Because SelectedItems now delivers multiple values when text is expected.

That didn't seem to work 😞

MorePowerBI
Frequent Visitor

Here's another snapshot for reference.

The sharepoint columns are listed to the right and they comprise of regular and complex data types.

Each field appears as a DataCard (left panel). The "DataCardValue#" is the DataCard component that end users would enter data into.

 

MorePowerBI_0-1630257849836.png

 

I'm trying to extract data and have those sent to my flow. To be clear, the flow works as intended - I just need to fix the Check Mark's OnSelect formula.

@MorePowerBI - Can you please share Check mark's OnSelect error screenshot.

This is what the formula is asking for:

Run(text, date, boolean, boolean_1, text_1, text_2, text_3, text_4, text_5, text_6, text_7, text_8, text_0)

 

and this is the formula:

 

NCEForm.Run(

DataCardValue5.Selected.Value,

Now(),

DataCardValue21.Selected.Value,

DataCardValue28.Selected.Value,

DataCardValue6.Text,

DataCardValue7.Selected.Value,

DataCardValue11.Text,

DataCardValue32.Text,

DataCardValue26.Selected.Value,

DataCardValue16.Selected.Value,

DataCardValue36.Selected.Value,

DataCardValue33.Text,

DataCardValue34.Text

)

 

And this is the error message:

NCEForm.Run failed: The method 'Run' has an invalid value for parameter 'text'

MorePowerBI
Frequent Visitor

I figured it out.

 

NCEForm.Run(

DataCardValue5.Selected.Value,

Text(DataCardValue1.SelectedDate, "yyyy-mm-dd"),

DataCardValue6.Text,

DataCardValue7.Selected.Value,

DataCardValue11.Text,

DataCardValue32.Text,

DataCardValue26.Selected.Value,

IF(

ISBLANK(DataCardValue2.SearchText),

DataCardValue2.Selected.Value, DataCardValue2.SearchText)

),

IF(

ISBLANK(DataCardValue3.SearchText),

DataCardValue3.Selected.Value, DataCardValue3.SearchText)

),

DataCardValue33.Text,

DataCardValue34.Text,

DataCardValue28.Selected.Value,

DataCardValue21.Selected.Value

)

 

The Date column requires reformatting so I needed to update the date value using Text(DataCardValue.SelectedDate, "yyyy-mm-dd")

For Choice columns with a fixed drop-down, I used DataCardValue.Selected.Value.

For Choice columns with the fill-in option enabled, I used

IF(

ISBLANK(DataCardValue.SearchText),

DataCardValue.Selected.Value, DataCardValue.SearchText)

)

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,588)