/build/static/layout/Breadcrumb_cap_w.png

SMA SQL: Subcategory question

Scenario: Rule changes the title of a service desk field if the character limit exceeds 50. I want the new field to read the category name and/or the category name plus something else. Now I have gotten that working, but it is not able to read subcategories. For example, if the category is "Microsoft:: Windows::Office" then the SQL will only change it to "Microsoft::" So how can I get it to show all of the subcategories? My SQL here: https://pastebin.com/Mmqx7hd5


0 Comments   [ + ] Show comments

Answers (1)

Posted by: Michelle.ashby 4 days ago
Purple Belt
0

Because of what you are saying it is doing, it is possible that SQL is reading the commas as part of the set statement? As you can pass comma separated values to SET, so maybe try:

SET (HD_TICKET.TITLE = CONCAT(HD_CATEGORY.NAME, ' : Test'))

if not an alternative syntax for that line could be:

SET HD_TICKET.TITLE = HD_CATEGORY.NAME + ' : Test'

Not sure what else to try.


Comments:
  • Well I have learned how to use concat to pass CSV, but the HD.CATEGORY.NAME only shows the top level category. What's more, it is showing our default category (Account::) rather than whatever the true category is. So another problem. - walkerl 4 days ago
    • If you query your DB (I do this in a table query "report" and run as HTML - just make sure to use LIMIT if you select *) does it also only show top level for HD_CATEGORY.NAME? If it shows the whole thing it shows there must be something incorrect with the query. Mine certainly shows the whole thing meaning I'd drill down on the UPDATE part as to the source of the problem. - Michelle.ashby 4 days ago
      • I think my SQL is calling the name of the available categories rather than the name of category chosen on the actual ticket I am working on. I am not sure how to format that to work correctly. I also have a goal of having a ticket rule append the excessively long ticket title into the ticket summary or new comments automatically and then change the title. I have not found a way to make that work. - walkerl 17 hours ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ