Hi All, I need help with the below code where the attachments are not getting patched to sharepoint list.
Also the below code helps to automatically show the next item in gallery to update the compliance status and auditors comments and patching it to sharepoint list. the number of questions in the gallery is filtered based on the type of audits and function selected, so it may vary as per the selection made. so as an example post filter if now my gallery named "GalleryQues_1" holds 10 question, the code automatically scrolls from ques 1 to next question ques 2 on submitting / patching with the help of below code. However, once it completes the patch for ques 10, it again goes back to ques 1. I need to navigate to screen 2 once the last ques 10 is patched to sharepoint. How can I achieve this?
Patch(
Audit_Responses,
Defaults(Audit_Responses),
{
Title: lblTitle.Text,
Audit_Program: dcAuditProgSelection_1.Selected.Value,
Center: dcCenterSelection_1.Selected.Value,
Cluster_Country: dcClusterCountrySelection_1.Selected.Value,
Function_Audited: dcFunctionSelection_1.Selected.Value,
Auditor_Name: auditornamevar,
Commissioning_Country: {Value: dcCommissioningCountry_1.Selected.Value},
Auditee_Name: dcAuditeeNames_1.Text,
Date_of_Audit: NowVar,
Compliance_Status: RadioAns_1.Selected.Value,
Auditor_Comments: dcAuditorComments_1.Text,
Audit_Period: dcAuditPeriodSelection_1.Selected.Value,
Attachments: FormQuestGal_1.Updates.Attachments
}
);
If(
IsEmpty(Errors(Audit_Responses)),
Notify(
"Success",
NotificationType.Success
);
Notify(
First(Errors(Audit_Responses)).Message,
NotificationType.Error
)
);
Select(
GalleryQues_1,
1,
NextArrow1
);