Hello,
I have a dataverse table (SSE | BDR Risk Managements) which contains four columns from other tables in the dataverse. The app has to allow users to write data in this table (add records). There are input forms allowing to do that. All of the inputs (except "Name") come from lookup tables. Note that there are dropdowns (based on the lookup columns). Only comment is a free text box.
When I run this function, I have the error "Value Must Be A Data Entity Error". How can I fix it?
thanks,
Marek
Patch(
'SSE | BDR Risk Managements',
Defaults ('SSE | BDR Risk Managements'),
{crde1_name: "Patch Test"},
{crde1_comment: Text(DataCardValue2.Value)},
{crde1_Entity: DataCardValue4},
{crde1_Customer: DataCardValue5},
{crde1_priority: DataCardValue3.Selected.Value},
{crde1_ReportDate: DataCardValue6}
)
Hello,
if you are using a form, why use "patch".
The "SubmitForm" function is more practical
For your question, when you create 1 single record, all your fields must be between "{}".
Patch(
'SSE | BDR Risk Managements',
Defaults ('SSE | BDR Risk Managements'),
{
crde1_name: "Patch Test",
crde1_comment: Text(DataCardValue2.Value),
crde1_Entity: DataCardValue4,
crde1_Customer: DataCardValue5,
crde1_priority: DataCardValue3.Selected.Value,
crde1_ReportDate: DataCardValue6
}
)
With several "{}", as in your example, it is to create several record, example:
Patch(
'SSE | BDR Risk Managements',
Defaults ('SSE | BDR Risk Managements'),
{
crde1_name: "Test1",
crde1_comment: Text(DataCardValue2.Value),
crde1_Entity: DataCardValue4,
crde1_Customer: DataCardValue5,
crde1_priority: DataCardValue3.Selected.Value,
crde1_ReportDate: DataCardValue6
},
{
crde1_name: "Test2",
crde1_comment: Text(DataCardValue2.Value),
crde1_Entity: DataCardValue4,
crde1_Customer: DataCardValue5,
crde1_priority: DataCardValue3.Selected.Value,
crde1_ReportDate: DataCardValue6
}
)
@daruom thanks for the reply!
1) What is the submit function, what do you mean? I am quite new to Power Apps...
2) I copied the first patch you put, but it doesn't work either - the same error message...
Edit
Ok got it with the submit function. The problem here is that I may need to add a user drop down from Office365 and I think for this I need a separate item (input box?)
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
195 | |
67 | |
46 | |
41 | |
28 |
User | Count |
---|---|
254 | |
119 | |
86 | |
84 | |
83 |