I am trying to edit the existing template for the Service Desk app but changing the data source to a Share Point list vs. the default table the template opens with. Can someone please help me understand how I can code the logic where it takes the existing tickets screen (I currently am retrieving data on the 'all tickets' page from my SP list) data and allows you to click/transition to another page where you can change parameters by additional clicks that will update the values on the SP list? The code out of the box looks like -
EditForm(TicketDetailsForm);
Navigate(TicketdetailsPage_1,ScreenTransition.Fade,
{EditRecord:ThisItem,
type:ThisItem.task_status,
assign:ThisItem.assignedto,
Area:ThisItem.department,
priority:ThisItem.priority,
subjectdisabled:true,
subjectfill:RGBA(0,0,0,0),
subject_visible:true,
description_disabled:true,
description_bordercolor:RGBA(0,0,0,0),
description_fill:RGBA(0,0,0,0),
description_visible:true,
commentdisabled:true,
commentbordercolor:RGBA(0,0,0,0),
commentfill:RGBA(0,0,0,0),
commentvisible:true})
and I am trying a variant of syntax using Patch
that looks like
Patch(
sharepoint_list_name,
LookUp(
sharepoint_list_name, SharePoint list
ID = ThisItem.ID
),
{
task_status: Text(ThisItem.task_status),
assignedto: Concatenate(
"i:0#.f|membership|",
User().Email // Person email
),
Department: "",
DisplayName: User().FullName,
Email: User().Email, // Person email
JobTitle: "",
Picture: "",
department: Text(ThisItem.department),
priority: Text(ThisItem.priority)
// Add more fields to update here as needed
}
);
Navigate(
TicketdetailsPage_1,
ScreenTransition.Fade,
{
EditRecord: ThisItem,
type: Text(ThisItem.task_status),
assign: Concatenate(
"i:0#.f|membership|",
User().Email // Person email
),
Department: "",
DisplayName: User().FullName,
Email: User().Email, // Person email
JobTitle: "",
Picture: "",
Area: Text(ThisItem.department),
priority: Text(ThisItem.priority),
subjectdisabled: true,
subjectfill: RGBA(0, 0, 0, 0),
subject_visible: true,
description_disabled: true,
description_bordercolor: RGBA(0, 0, 0, 0),
description_fill: RGBA(0, 0, 0, 0),
description_visible: true,
commentdisabled: true,
commentbordercolor: RGBA(0, 0, 0, 0),
commentfill: RGBA(0, 0, 0, 0),
commentvisible: true
}
)
I honestly have no idea what the logic is doing here - I don't understand how the default table data allows the user to click the window and transition to another page where items can be selected and have the values update. I am just trying to accomplish the same thing but with a SP list. Anything here would be greatly appreciated. Thank you.
These are my SP column names/types
assignedto - person/group
priority - choice
department - choice
task_status - choice
The high level logic is this:
2 things to change: