
Announcements
Can anyone help me to solved this issue. I am not able to save the information into my SharePoint List. I have try using only Collect function and is not working. Now I am trying to use collect and the Patch the collection into my SharePoint list, but I am having this error: Cannot use non-record value in this context.
UpdateContext({varTicketId:If(IsBlank(MainList),1,Last(MainList).TicketId + 1)});
Collect(MainListCol, {
TicketId:varTicketId,
Title:ProjectNoDropDown.SelectedText.Value,
Tool:ToolDropDown.Selected,
Priority:PriorityDropDown.Selected,
RequestBy:RequestByText.Text,
RequesterEmail: RequesterEmailText.Text,
Created:Now(),
TaskStatus:TaskStatusDropDown.Selected,
PercentComplete:0,
AssignedTO:Text(AdminEmailText.Text),
DESCRIPTION:CreateTicketScreenTaskDescription.Text,
Comments:CommentText.Text,
PipingClass:PipingClassText.Text,
LineNo:LineNumberText.Text,
PID:PidText.Text,
Modified:Now()
});
Patch(
MainList,
ForAll(
MainListCol As aCol,
{
TicketId: aCol.TicketId,
Title: aCol.Title,
Tool: aCol.Tool,
Priority: aCol.Priority,
RequestBy: aCol.RequestBy,
RequesterEmail: aCol.RequesterEmail,
Created: Now(),
TaskStatus: aCol.TaskStatus,
PercentComplete: 0,
AssignedTO: aCol.AssignedTO,
Description: aCol.Description,
Comments: aCol.Comments,
PipingClass: aCol.PipingClass,
LineNo: aCol.LineNo,
PID: aCol.PID,
Modified: Now()
}
)
);
Verify that the columns you’re trying to update in your SharePoint list match the expected data types (e.g., text, number, date).
Double-check the field names in your Patch function to ensure they match the actual column names in your SharePoint list.
If you’re using variables, make sure they contain valid records.
Consider using the LookUp function to retrieve the correct record from your collection before patching it to SharePoint.