Hi Expert,
I am trying to follow Procedure mention in below Post to create "Visitor Managment App" but stuck in few area's and facing issue.
I just developed three forms 1. Edit Form 2. Dashboard Screen
In a Edit Form we are unable to submit data on SharePoint List with a below mention code
Patch(visitorRegistration, Defaults(visitorRegistration), {VisitorName: DataCardValue1.Text,Address: DataCardValue2.Text,OrganizationName: DataCardValue3.Text,
ContactNumber: DataCardValue4.Text,
ContactPerson: DataCardValue5.value,
Contactemail: DataCardValue6.value,
Reason: DataCardValue7.Text)};
Now i am want to understand is this above code is for submit button ?
What is the Data Type of Value for Person or Group ?
If Code for Submit button is not correct then which is the correct code for submit button as per requirement we have to send email with each submit.
Solved! Go to Solution.
Hi @Anonymous :
Let me answer your questions one by one.
Q1:Now i am want to understand is this above code is for submit button ?
Yes.But judging from your screenshot, this formula does not seem to be finished, so an error occurred.
Patch(visitorRegistration, Defaults(visitorRegistration), {VisitorName: DataCardValue1.Text,Address: DataCardValue2.Text,OrganizationName: DataCardValue3.Text,
ContactNumber: DataCardValue4.Text (In the screenshot, your formula seems to be interrupted here)
Q2:What is the Data Type of Value for Person or Group ?
If the column allow mutiple selection,it is a table:
[
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
DisplayName:DisplayName,
Claims:"i:0#.f|membership|" & EmailAdress,
Email:EmailAdress
}
]
If the column do not allow mutiple selection,it is a record:
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
DisplayName:DisplayName,
Claims:"i:0#.f|membership|" & EmailAdress,
Email:EmailAdress
}
I think this link will help you a lot:
https://powerusers.microsoft.com/t5/Building-Power-Apps/Person-column-and-SubmitForm/td-p/549235
Q3:If Code for Submit button is not correct then which is the correct code for submit button as per requirement we have to send email with each submit.
Because of the lack of information (List data structure, Form settings.......), I can not directly provide the correct code.
I suggest you follow the link you gave and replace Patch() with SubmitForm().
Best Regards,
Bof
Hi @Anonymous :
Let me answer your questions one by one.
Q1:Now i am want to understand is this above code is for submit button ?
Yes.But judging from your screenshot, this formula does not seem to be finished, so an error occurred.
Patch(visitorRegistration, Defaults(visitorRegistration), {VisitorName: DataCardValue1.Text,Address: DataCardValue2.Text,OrganizationName: DataCardValue3.Text,
ContactNumber: DataCardValue4.Text (In the screenshot, your formula seems to be interrupted here)
Q2:What is the Data Type of Value for Person or Group ?
If the column allow mutiple selection,it is a table:
[
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
DisplayName:DisplayName,
Claims:"i:0#.f|membership|" & EmailAdress,
Email:EmailAdress
}
]
If the column do not allow mutiple selection,it is a record:
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
DisplayName:DisplayName,
Claims:"i:0#.f|membership|" & EmailAdress,
Email:EmailAdress
}
I think this link will help you a lot:
https://powerusers.microsoft.com/t5/Building-Power-Apps/Person-column-and-SubmitForm/td-p/549235
Q3:If Code for Submit button is not correct then which is the correct code for submit button as per requirement we have to send email with each submit.
Because of the lack of information (List data structure, Form settings.......), I can not directly provide the correct code.
I suggest you follow the link you gave and replace Patch() with SubmitForm().
Best Regards,
Bof