Hi
I downloaded the help desk template and have customised it.
Below is 1. the Default OnStart code - (does not permanently store tickets & it has default tickets)
Below is 2. My Code when i click on Create Ticket
Objective:
To permanently store tickets, please help me resolve the OnStart & Create Ticket code.
1. OnStart Code
ClearCollect(TaskCategories,["CALL OUT REQUIRED","SPARE PART REQUIRED","TELEPHONIC ADVICE"]);
ClearCollect(TaskStatus,"NOT STARTED","IN PROGRESS","COMPLETED");
ClearCollect(TaskPriority,"HIGH","MEDIUM","LOW");
Set(MyProfile,Office365Users.MyProfile());
ClearCollect(AdminList,"jerry.haldane@atalianworld.com");
ClearCollect(TicketList,{Id:1,Title:"Fix Mouse",Description:"That is my cat!!!",Category:"CALL OUT REQUIRED",PercentComplete:"0.9",Priority:"HIGH",AssignedTO:"THOMAS ANDERSEN",TaskStatus:"COMPLETED",Author:"ScottK@contoso.com",Editor:"Scott Konersmann",Created:"2/8/2018 3:29 PM",Modified:"2/5/2018 3:29 PM"},{Id:2,Title:"Replace keyboard", Description:"Please do it ASAP",Category:"SPARE PART REQUIRED",PercentComplete:"0.8",Priority:"LOW",AssignedTO:"YVONNE MCKAY",LocationName:"", TaskStatus:"IN PROGRESS",Author:"PATRICK SANDS",Editor:"THOMAS ANDERSEN",Created:"2/5/2018 3:29 PM",Modified:"2/5/2018 3:29 PM"});
Set(NumberOfTickets,CountRows(TicketList))
2. Create Ticket Code
Set(NumberOfTickets,NumberOfTickets + 1);
Patch(TicketList,Defaults(TicketList),{Id:NumberOfTickets,
Title:CreateTicketScreenTitleText.Text,
Priority: CreateTicketScreenPriorityDropDown.SelectedText.Value,
Author:MyProfile.Mail,
TaskStatus:"NOT STARTED",
PercentComplete: "0",
Created:Now(),
AssignedTO:"",
Description:CreateTicketScreenTaskDescription.Text,
Editor:MyProfile.Mail,
Modified:Now(),
Category:CreateTicketScreenCategoryDropDown.SelectedText.Value });
Reset(CreateTicketScreenTitleText);
Reset(CreateTicketScreenTaskDescription);
Reset(CreateTicketScreenCategoryDropDown);
Reset(CreateTicketScreenPriorityDropDown);
Navigate(MyTicketsScreen,ScreenTransition.None)
You need to create a data source to replace the TicketList collection. Then everywhere that a Patch is used to update TicketList you would update the new data source instead. YOu can see the ClearCollect() statement in the OnStart. That's what creates the collection and load the default tickets. Then Patch() statement is what creates a new ticket in the collection. Those statements need to refer to a data source instead of a collection.
Hi Pstork1 - Thank you.
Ok, i will create a new Sharepoint List and name it TicketList.
I will then compete the rest of your suggestions and let you know how i get on.
Kind regards
Jerry
Hi, Thanks again for helping me.
Looking forward to your response.
ClearCollect(TaskCategories,["CALL OUT REQUIRED","SPARE PART REQUIRED","TELEPHONIC ADVICE"]);
ClearCollect(TaskStatus,"NOT STARTED","IN PROGRESS","COMPLETED");
ClearCollect(TaskPriority,"HIGH","MEDIUM","LOW");
Set(MyProfile,Office365Users.MyProfile());
ClearCollect(AdminList,"jerry.haldane@atalianworld.com");
Collect(TicketList1,{Id:1,Title:"Fix Mouse",Description:"That is my cat!!!",Category:"CALL OUT REQUIRED",PercentComplete:"0.9",Priority:"HIGH",AssignedTO:"THOMAS ANDERSEN",TaskStatus:"COMPLETED",Author:"ScottK@contoso.com",Editor:"Scott Konersmann",Created:"2/8/2018 3:29 PM",Modified:"2/5/2018 3:29 PM"},{Id:2,Title:"Replace keyboard", Description:"Please do it ASAP",Category:"SPARE PART REQUIRED",PercentComplete:"0.8",Priority:"LOW",AssignedTO:"YVONNE MCKAY", TaskStatus:"IN PROGRESS",Author:"PATRICK SANDS",Editor:"THOMAS ANDERSEN",Created:"2/5/2018 3:29 PM",Modified:"2/5/2018 3:29 PM"});
Set(NumberOfTickets,CountRows(TicketList1))
hi again, im so sorry for so many messages.
I understand you want me to create a new datasource. I have the existing HelpDesk Sharepoint which the installation instructions asked me to build. See below. I removed TicketList and replaced with HelpDesk but am then faced with errors. Is the below datasource what you were referring to?
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
189 | |
65 | |
46 | |
35 | |
25 |
User | Count |
---|---|
243 | |
106 | |
89 | |
85 | |
64 |