web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Customised Help Desk t...
Power Apps
Unanswered

Customised Help Desk template code support

(0) ShareShare
ReportReport
Posted on by 431

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)

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,599 Most Valuable Professional on at

    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.

  • JerryH Profile Picture
    431 on at

    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

  • JerryH Profile Picture
    431 on at

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

  • JerryH Profile Picture
    431 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 96 Super User 2026 Season 1

Last 30 days Overall leaderboard