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
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (3,839)