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
Super User
Super User

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)

)

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (4,325)