cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

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
Highlighted
Dual Super User III
Dual Super User III

Re: Customised Help Desk template code support

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.
Highlighted
Helper V
Helper V

Re: Customised Help Desk template code support

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

Highlighted
Helper V
Helper V

Re: Customised Help Desk template code support

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))

Highlighted
Helper V
Helper V

Re: Customised Help Desk template code support

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,708)