Hi Expert,
Im trying to create a Custom form from SP list using powerapps. I'm having cascading dropdown, listbox & Data card. I'm stucking after a few hours searching online about patching attachment to my SP List.
Here is the code of my submit button, it will create 2 row like attachment.
Set(
currentRecord,
Patch(
Data,
Defaults(Data),
{
Department: DataCardValue8.Selected.Result,
Team: DataCardValue6.Selected.Result,
FullName: Concat(
ListBox1.SelectedItems,
'Full Name' & ","
),
Category: {
Value: DataCardValue3.Selected.Value,
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
}
}
)
);
SubmitForm(SharePointForm1);
NewForm(SharePointForm1)//;Navigate(Screen1,ScreenTransition.Fade)
Any help pleaseee 😞
Solved! Go to Solution.
Then you don't have the Update properties set right on the Datacards that contain them.
Based on your patch formula, the Update properties of the datacards should be as follows:
For Department datacard: DataCardValue8.Selected.Result
For Team datacard: DataCardValue6.Selected.Result
For FullName datacard: Concat(ListBox1.SelectedItems, 'Full Name' & ",")
For Category datacard: {Value:DataCardValue3.Selected.Value}
Why are you patching things from your Form?
The only function you need to submit your form is SubmitForm.
This is also the only mechanism to submit attachments.
Then you don't have the Update properties set right on the Datacards that contain them.
Based on your patch formula, the Update properties of the datacards should be as follows:
For Department datacard: DataCardValue8.Selected.Result
For Team datacard: DataCardValue6.Selected.Result
For FullName datacard: Concat(ListBox1.SelectedItems, 'Full Name' & ",")
For Category datacard: {Value:DataCardValue3.Selected.Value}
No problem! Yes, in general, stay away from Patches when you are using a Form...it will do everything for you.
User | Count |
---|---|
252 | |
104 | |
94 | |
50 | |
39 |