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.
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.
Help is greatly appreciated.
Solved! Go to Solution.
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)
)
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.
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/
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 😞
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.
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.
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'
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)
)
User | Count |
---|---|
252 | |
104 | |
94 | |
50 | |
39 |