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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

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