cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JerryH
Resolver III
Resolver III

Customised Help Desk template code support

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)

4 REPLIES 4
Pstork1
Dual Super User III
Dual Super User III

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

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.

  1. I have named the collection TicketList1, but it is still not saving the tickets i create when i log back in?
  2. When you said a new DataSource, did you mean new Collection or Sharepoint list?
  3. How can i remove the default ticket info, or should i leave?
  4. I also changed ClearCollect to Collect (Bold below) - am i wrong. I would have thought we wanted to collect the tickets.
  5. I have also replaced all the Patch with TicketList1

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?

 

Sharepoint.PNG

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,394)