Patch in save function of SharePoint Integration

%3CLINGO-SUB%20id%3D%22lingo-sub-2014034%22%20slang%3D%22en-US%22%3EPatch%20in%20save%20function%20of%20SharePoint%20Integration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2014034%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22o9v6fnle%20cxmmr5t8%20oygrvhab%20hcukyx3x%20c1et5uql%20ii04i59q%22%3E%3CDIV%3EI%20am%20facing%20some%20issues%20in%20power%20app%20in%20save%20function.%20I%20used%20customize%20form%20with%20power%20app%20in%20SharePoint%20online.%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22o9v6fnle%20cxmmr5t8%20oygrvhab%20hcukyx3x%20c1et5uql%20ii04i59q%22%3E%3CDIV%3EIn%20save%20function%20%2C%20I%20need%20to%20use%20Patch()%20instead%20of%20submitform(SharePointform1).%20Sometimes%20it%20is%20saved%20data%20and%20sometimes%20it%20is%20not.%20How%20can%20I%20do%20it%3F%20Please%20help%20me!%20What's%20wrong%20in%20it%3F%3C%2FDIV%3E%3CDIV%3EI%20used%20the%20following%20code.%3C%2FDIV%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EIf(SharePointForm1.Mode%3DNew%2C%3C%2FDIV%3E%3CDIV%3E(Patch('Details'%2CDefaults('Details')%2C%7B'IGT%20Site%20Code'%3A%7B'%40odata.type'%3A%20%22%23Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference%22%2C%20Value%3A%20DataCardValue163.Selected.Title%7D%2C'Project%20Number'%3ADataCardValue1.Text%7D))%2C%20Patch('%20Details'%2CFirst(Filter('Details'%2C'Project%20Number'%3DDataCardValue1.Text))%2C%7B'IGT%20Site%20Code'%3A%7B'%40odata.type'%3A%20%22%3CA%20href%3D%22https%3A%2F%2Fwww.facebook.com%2Fhashtag%2Fmicrosoft%3F__eep__%3D6%26amp%3B__cft__%5B0%5D%3DAZUxfjJNxsGmOzPr2ofdzzZI94KWfmLaOp3HwEP2EYKe_sW7RIoAIO9j4XLNiEcLEOCaqyK5qAoBCwW6sFaYxGD-SLpdeh52Zm_mT9AWyubCXXxnEuge-VvBAyMKBkJrHfk%26amp%3B__tn__%3DR%5D-R%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%23Microsoft%3C%2FA%3E.Azure.Connectors.SharePoint.SPListExpandedReference%22%2C%20Value%3A%20DataCardValue163.Selected.Title%7D%2C'Project%20Number'%3ADataCardValue1.Text%7D))%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2014034%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerApps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

Hello,

 

I am facing some issues in power app in save function. I used customize form with power app in SharePoint online.
In save function , I need to use Patch() instead of submitform(SharePointform1). Sometimes it is saved data and sometimes it is not. How can I do it? Please help me! What's wrong in it?
I used the following code.
 If(SharePointForm1.Mode=New,
(Patch('Details',Defaults('Details'),{'IGT Site Code':{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", Value: DataCardValue163.Selected.Title},'Project Number':DataCardValue1.Text})), Patch(' Details',First(Filter('Details','Project Number'=DataCardValue1.Text)),{'IGT Site Code':{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", Value: DataCardValue163.Selected.Title},'Project Number':DataCardValue1.Text}));
1 Reply

@Hnin_Yu why do you need to use on the customised form instead of SubmitForm(SharePointForm1) ?

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User