cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Change Data Type in Help Desk Template

This question might sound very obvious to most PowerApps users but since i am a beginner hopefully someoe could help me. I am using the powerapps Help Desk template and it is working perfecly but i need to change the CATEGORY field from picklist (Default) to text (new) and i want to do this is all views (create, view and edit). Can anyone help regarding this?

Thanks a lot in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Change Data Type in Help Desk Template

Hi @Anonymous,

 

Could you please share a bit more about your scenario?

Do you want to type a value for the CATEGORY field (in CreateTicketScreen and EditTicketScreen) within a TextInput control rather than select select value from the Dropdown options?

 

If you want to type a value for the CATEGORY field (in CreateTicketScreen and EditTicketScreen) within a TextInput control rather than select select value from the Dropdown options, you should remove the Dropdown box from corresponding screens (CreateTicketScreen and EditTicketScreen), and then add a TextInput control for the field.

 

I have made a test on my side, please take a try with the following workaround:

 

Within the CreateTicketScreen:

 

  • Remove the Dropdown control for the CATEGORY field, and add a TextInput control (named "CreateTicketScreenCategoryText") for it.
  • Modify the formula within the OnSelect property of the "CREATE" button as below:

 

Set(NumberOfTickets,NumberOfTickets + 1);
Patch(TicketList,Defaults(TicketList),{Id:NumberOfTickets,
    Title:CreateTicketScreenTitleText.Text,
    Priority: CreateTicketScreenPriorityDropDown.Selected.Value,
    Author:MyProfile.Mail,
    TaskStatus:"NOT STARTED",
    PercentComplete: "0",
    Created:Now(),
    AssignedTO:"",
    Description:CreateTicketScreenTaskDescription.Text,  
    Editor:MyProfile.Mail,
    Modified:Now(),
    Category:CreateTicketScreenCategoryText.Text  }); /* <-- Modify here */
    Reset(CreateTicketScreenTitleText);
    Reset(CreateTicketScreenTaskDescription);
    Reset(CreateTicketScreenCategoryText);         /* <-- Modify here */
    Reset(CreateTicketScreenPriorityDropDown);
    Navigate(ConfirmSubmitScreen,None)

 

  • Modify the OnSelect property of the "CANCEL" button as below:

 

Reset(CreateTicketScreenTitleText);
Reset(CreateTicketScreenTaskDescription);
Reset(CreateTicketScreenCategoryText);  /* <-- Modify formula here */
Reset(CreateTicketScreenPriorityDropDown);
Navigate(MyTicketsScreen,None)

 

  • Modify the OnSelect property of the "Back" icon button as below:

 

Reset(CreateTicketScreenTitleText);
Reset(CreateTicketScreenTaskDescription);
Reset(CreateTicketScreenCategoryText);    /* <-- Modify here */
Reset(CreateTicketScreenPriorityDropDown);
Navigate(MyTicketsScreen,None)

The GIF screenshot as below:Test1.gif

 

 

Within the EditTicketScreen (the same as that within CreateTicketScreen):

 

  • Remove the Dropdown control for the CATEGORY field, and add a TextInput control (named "EditTicketScreenCategoryText") for it.
  • Set the Default property of above TextInput control to following formula:

 

SelectedTicket.Category

 

  • Modify the OnSelect property of the "UPDATE" button as below:

 

If(isAdmin,
    Patch(TicketList,LookUp(TicketList,Id=SelectedTicket.Id),{
    Priority:EditTicketScreenPriorityDropDown.Selected.Value,
    Category:EditTicketScreenCategoryText.Text,           /* <-- Modify here */
    TaskStatus:EditTicketScreenStatusDropdown.Selected.Value,  
    PercentComplete:EditTicketScreenCompletedSlider.Value/100,
    AssignedTO:AssignedToUserDisplayName,
    Editor:MyProfile.Mail,
    Modified:Now(),
    Description:EditTicketScreenDescriptionInput.Text
    }),

   Patch(TicketList,LookUp(TicketList,Id = SelectedTicket.Id),{
    Priority:EditTicketScreenPriorityDropDown.Selected.Value,
    Category:EditTicketScreenCategoryText.Text,   /* <-- Modify here */
    Editor:MyProfile.Mail,
    Modified:Now(),
    Description:EditTicketScreenDescriptionInput.Text
   }
));  
Reset(EditTicketScreenCompletedSlider);
Reset(EditTicketScreenStatusDropdown);
Navigate(MyTicketsScreen,None)
  • Modify the OnSelect property of the "CANCAL" button as below:
Reset(EditTicketScreenCompletedSlider);
Reset(EditTicketScreenStatusDropdown);
Reset(EditTicketScreenDescriptionInput);
Reset(EditTicketScreenPriorityDropDown);
Reset(EditTicketScreenCategoryText);  /* <-- Modify here */
Reset(EditTicketScreenCompletedSlider);
Navigate(MyTicketsScreen,None)
  • Modify the OnSelect property of the "Back" icon button as below:
Reset(EditTicketScreenCompletedSlider);
Reset(EditTicketScreenStatusDropdown);
Reset(EditTicketScreenDescriptionInput);
Reset(EditTicketScreenPriorityDropDown);
Reset(EditTicketScreenCategoryText); /* <-- Modify here */
Reset(EditTicketScreenCompletedSlider);
Back()

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Change Data Type in Help Desk Template

Hi @Anonymous,

 

Could you please share a bit more about your scenario?

Do you want to type a value for the CATEGORY field (in CreateTicketScreen and EditTicketScreen) within a TextInput control rather than select select value from the Dropdown options?

 

If you want to type a value for the CATEGORY field (in CreateTicketScreen and EditTicketScreen) within a TextInput control rather than select select value from the Dropdown options, you should remove the Dropdown box from corresponding screens (CreateTicketScreen and EditTicketScreen), and then add a TextInput control for the field.

 

I have made a test on my side, please take a try with the following workaround:

 

Within the CreateTicketScreen:

 

  • Remove the Dropdown control for the CATEGORY field, and add a TextInput control (named "CreateTicketScreenCategoryText") for it.
  • Modify the formula within the OnSelect property of the "CREATE" button as below:

 

Set(NumberOfTickets,NumberOfTickets + 1);
Patch(TicketList,Defaults(TicketList),{Id:NumberOfTickets,
    Title:CreateTicketScreenTitleText.Text,
    Priority: CreateTicketScreenPriorityDropDown.Selected.Value,
    Author:MyProfile.Mail,
    TaskStatus:"NOT STARTED",
    PercentComplete: "0",
    Created:Now(),
    AssignedTO:"",
    Description:CreateTicketScreenTaskDescription.Text,  
    Editor:MyProfile.Mail,
    Modified:Now(),
    Category:CreateTicketScreenCategoryText.Text  }); /* <-- Modify here */
    Reset(CreateTicketScreenTitleText);
    Reset(CreateTicketScreenTaskDescription);
    Reset(CreateTicketScreenCategoryText);         /* <-- Modify here */
    Reset(CreateTicketScreenPriorityDropDown);
    Navigate(ConfirmSubmitScreen,None)

 

  • Modify the OnSelect property of the "CANCEL" button as below:

 

Reset(CreateTicketScreenTitleText);
Reset(CreateTicketScreenTaskDescription);
Reset(CreateTicketScreenCategoryText);  /* <-- Modify formula here */
Reset(CreateTicketScreenPriorityDropDown);
Navigate(MyTicketsScreen,None)

 

  • Modify the OnSelect property of the "Back" icon button as below:

 

Reset(CreateTicketScreenTitleText);
Reset(CreateTicketScreenTaskDescription);
Reset(CreateTicketScreenCategoryText);    /* <-- Modify here */
Reset(CreateTicketScreenPriorityDropDown);
Navigate(MyTicketsScreen,None)

The GIF screenshot as below:Test1.gif

 

 

Within the EditTicketScreen (the same as that within CreateTicketScreen):

 

  • Remove the Dropdown control for the CATEGORY field, and add a TextInput control (named "EditTicketScreenCategoryText") for it.
  • Set the Default property of above TextInput control to following formula:

 

SelectedTicket.Category

 

  • Modify the OnSelect property of the "UPDATE" button as below:

 

If(isAdmin,
    Patch(TicketList,LookUp(TicketList,Id=SelectedTicket.Id),{
    Priority:EditTicketScreenPriorityDropDown.Selected.Value,
    Category:EditTicketScreenCategoryText.Text,           /* <-- Modify here */
    TaskStatus:EditTicketScreenStatusDropdown.Selected.Value,  
    PercentComplete:EditTicketScreenCompletedSlider.Value/100,
    AssignedTO:AssignedToUserDisplayName,
    Editor:MyProfile.Mail,
    Modified:Now(),
    Description:EditTicketScreenDescriptionInput.Text
    }),

   Patch(TicketList,LookUp(TicketList,Id = SelectedTicket.Id),{
    Priority:EditTicketScreenPriorityDropDown.Selected.Value,
    Category:EditTicketScreenCategoryText.Text,   /* <-- Modify here */
    Editor:MyProfile.Mail,
    Modified:Now(),
    Description:EditTicketScreenDescriptionInput.Text
   }
));  
Reset(EditTicketScreenCompletedSlider);
Reset(EditTicketScreenStatusDropdown);
Navigate(MyTicketsScreen,None)
  • Modify the OnSelect property of the "CANCAL" button as below:
Reset(EditTicketScreenCompletedSlider);
Reset(EditTicketScreenStatusDropdown);
Reset(EditTicketScreenDescriptionInput);
Reset(EditTicketScreenPriorityDropDown);
Reset(EditTicketScreenCategoryText);  /* <-- Modify here */
Reset(EditTicketScreenCompletedSlider);
Navigate(MyTicketsScreen,None)
  • Modify the OnSelect property of the "Back" icon button as below:
Reset(EditTicketScreenCompletedSlider);
Reset(EditTicketScreenStatusDropdown);
Reset(EditTicketScreenDescriptionInput);
Reset(EditTicketScreenPriorityDropDown);
Reset(EditTicketScreenCategoryText); /* <-- Modify here */
Reset(EditTicketScreenCompletedSlider);
Back()

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,168)