Jump to content
Sign in to follow this  
isaque.almeida

Filter Symptom Code List by Category

Recommended Posts

Hi experts,

I have the list of symptom codes on my usp_symptom_code table as follows:

id    del    sym
900    0    Application Not Responding
901    0    Error Message
902    0    High CPU Usage
903    0    Slow Response
904    0    System Making Noise
905    0    Unable to Connect
906    0    Unable to Log in
907    0    Unexpected Results
908    0    Unable to Boot
400001    0    Phone Not Responding
400002    0    Phone Error Message
400003    0    Phone Password Forgotten
400004    0    Phone Slow Response
400005    0    Phone Unexpected Results
400006    0    Phone Unable to Start

                        
What I want to dos is: When I open a new incident, if choose some category like 'HARDWARE.CELULAR%' just symptom codes related to it appears.

This is my code on "detail_in.htmpl":

var catCelular = 0;
<PDM_LIST PREFIX=celularList WHERE="ref_num = '$args.ref_num' AND category.sym LIKE 'HARDWARE.CELULAR.%'" FACTORY=cr>
// $celularList.id
catCelular = 1;
</PDM_LIST>
if(catCelular == 1) {
<PDM_MACRO name=dtlDropdown hdr="Symptom" attr=symptom_code lookup=no whereclause="id IN (400001, 400002, 400003, 400004, 400005, 400006)">
}else{
<PDM_MACRO name=dtlDropdown hdr="Symptom" attr=symptom_code lookup=no whereclause="id IN (900, 901, 902, 903, 904, 905, 906, 907, 908)">
};

                                              
When I create a new incident, before I choose some category it is ok, it is showing only symptom codes not related to category  'HARDWARE.CELULAR%' but when I choose one of these categories the options are not filtered.

I hope I was able to be clear, I will be thankful if someone could help me on this.

Thanks in advance. Bye.

 

 

 

 

Pic3.jpeg

Share this post


Link to post
Share on other sites

Hi Isaque,

You need some coding at client side to update the combo options, based on category changing events. The code you developed will work only for saved tickets where current category is hardware.celular.

Regards,

Eduardo

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Announcements

    • Gregg

      Looking for the wiki content?

      12/20/2015

      Until I can transfer the wiki content over to the new Articles, you can find the old content here: http://www.greggsmith.net/wiki.
    • Gregg

      New site logo

      01/06/2016

      A special thanks to brianshs for creating a new site logo!
×