Hi,
**** ChatGPT Response to question ****
It seems like you’re trying to pass the values from the DataCards (which are form fields in Power Apps) to your Power Automate flow, but you're encountering an issue because the control inside the DataCard (e.g., DataCardValue21) is not being referenced correctly.
Understanding the Issue:
In Power Apps, each field in a form is contained inside a DataCard, and the actual value of the field is inside a DataCardValue control. For example:
- If you have a Text input inside a DataCard, the value of the field is typically in the
Text property of the DataCardValue.
However, when you're calling the flow in Power Apps using FlowName.Run(), you need to pass the value of the control (not the DataCard itself), which would be something like DataCardValue21.Text (for a text input) or DataCardValue21.Selected.Value (for a dropdown, for example).
Solution:
You need to ensure you're passing the actual value of the DataCardValue control (e.g., the text, selected value, etc.) into the flow, not the DataCard itself.
Steps to Fix:
-
Identify the Control in the DataCard:
- Text Input Control: If it's a text input, you should reference
DataCardValue21.Text.
- Dropdown Control: If it's a dropdown, use
DataCardValue21.Selected.Value.
- Date Picker: If it's a date picker, use
DataCardValue21.SelectedDate.
- Checkbox: If it's a checkbox, use
DataCardValue21.Value (this will return true or false).
-
Call the Flow with Correct Parameters:
When you are calling the flow in Power Apps, ensure you're passing the correct values, as shown below:
FlowName.Run(
DataCardValue21.Text, // for a text input field
DataCardValue22.Selected.Value, // for a dropdown field
DataCardValue23.SelectedDate, // for a date picker field
DataCardValue24.Value // for a checkbox field
)
This will pass the actual values of each DataCard to your flow.
-
Make Sure You Have the Right Number of Parameters in the Flow:
- In your flow, ensure that the number of inputs matches the number of fields you are passing from Power Apps. Each input in your flow (e.g.,
Compose actions for each field) should correspond to one of the parameters you're passing from Power Apps.
-
Test the Flow:
- After adjusting the formula, test the form to ensure that the data is passed correctly to the flow and that the
Create Item action successfully adds data to the SharePoint list.
Example of Full Formula:
If you have 10 fields in your form, you would call the flow like this:
FlowName.Run(
DataCardValue1.Text, // First field
DataCardValue2.Text, // Second field
DataCardValue3.Selected.Value, // Third field (dropdown)
DataCardValue4.SelectedDate, // Fourth field (date picker)
DataCardValue5.Value, // Fifth field (checkbox)
DataCardValue6.Text, // And so on...
DataCardValue7.Text,
DataCardValue8.Text,
DataCardValue9.Text,
DataCardValue10.Text
)
Conclusion:
The issue you're facing is because you're trying to reference the DataCard itself instead of the DataCardValue control inside it. You need to pass the value of the control (e.g., Text, SelectedValue, SelectedDate, Value) into the flow. Make sure you are correctly referencing each control's value when calling the flow.
----------------------------------------------------------------------------------
If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!