Friday, 21 May 2021

Power App and SharePoint Connection Patch Update Query

 Create Data in SharePoint from Canvass APP 


Patch(
'SharePoint Data', //Data base 
Defaults('SharePoint Data'),
{
Title: TextInput1_1.Text,
'Last Name': TextInput2_1.Text,
Email: TextInput3_1.Text,
'Candidate ID': Value(TextInput4_1.Text),
'Reason for Late Submission': TextInput5_1.Text,
'Detailed Work Description': TextInput6_1.Text,
'Work Request Justification': TextInput7.Text
},


{//for Drop Down 
'Work Description': {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: Dropdown1.SelectedText.ID,
Value: Dropdown1.SelectedText.Title
},
'Project Approver':{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: Dropdown2.Selected.ID,
Value: Dropdown2.Selected.Value
}
}

);


Update 

UpdateIf('SharePoint Data', 'Candidate ID'= Value(TextInput4_2.Text),{
Title:TextInput1_2.Text,
'Last Name':TextInput2_2.Text,
Email:TextInput3_2.Text,
'Candidate ID':Value(TextInput4_2.Text),
'Reason for Late Submission':TextInput5_2.Text,
'Detailed Work Description':TextInput6_2.Text,
'Work Request Justification':TextInput2_2.Text,
'Work Description': {
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:Dropdown1_1.SelectedText.ID,
Value:Dropdown1_1.SelectedText.Title}
});
Navigate(Screen2,ScreenTransition.Fade)


No comments:

Post a Comment