/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Script for copy mail field to cc_list

04/11/2016 782 views
Hello,
i have a question about tickets on K1000. I want to know if someone has a script which copy the adresse field into the cc_list field ? For not having to copy and paste by hand each time ...
Thank you
2 Comments   [ + ] Show comments

Comments

  • Which address field? The submitter's?
    • yeah the mail address of the submitter. I would like to automaticaly copy this address into the cc_list field ...
      • If there is something already in the cc_list field do you care if it is overwritten?
  • No, there is nothing in the cc_list field

All Answers

0
This select statement will match tickets without a value in the CC_LIST field. I did it this way because otherwise the rule would run on every ticket save and that's not as efficient. Of course if you want the CC_LIST field to change if the submitter changes then you would need to change this.
select HD_TICKET.* from HD_TICKET
where HD_TICKET.CC_LIST =''
This update statement will set the CC_LIST field to the email address of the submitter:
update HD_TICKET
    set HD_TICKET.CC_LIST = 
(select USER.EMAIL from USER where USER.ID = HD_TICKET.SUBMITTER)
  where 
        (HD_TICKET.ID in (<TICKET_IDS>))

Answered 04/13/2016 by: chucksteel
Red Belt

  • Fine, i will try it. thanks u !

Don't be a Stranger!

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

Sign up! or login

View more:

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