Menu

Send approval mail to custom form field

2024-03-06
2024-03-14
  • David Gayangos

    David Gayangos - 2024-03-06

    Good morning, I have two products installed in Itop: Approval process automation and Customized request forms. In a custom form I have created a dropdown field called "approver" (SELECT Person). This approver should receive an email from the approval rules, I'm not clear how to create the query.

    Thank you so much

     
  • David Gayangos

    David Gayangos - 2024-03-06

    Good morning, this query seems to solve the problem:

    SELECT Person AS p
    JOIN TemplateFieldValueLnk AS v ON v.field_target_key=p.id
    JOIN UserRequest AS u ON v.obj_key=u.id
    WHERE u.id=:this->id

     
  • David Gayangos

    David Gayangos - 2024-03-13

    Good morning, in case it helps anyone. The previous query returns all the people in different fields of the form. If there is more than one it would not work. For it to only return the approver it would be:

    SELECT Person AS p
    JOIN TemplateFieldValueLnk AS v ON v.field_target_key=p.id
    JOIN UserRequest AS u ON v.obj_key=u.id
    WHERE v.field_code='approver' AND u.id=:this->id

     
  • Vincent @ Combodo

    Thanks David, I have added your suggestion into the Q&A wiki of the 'Approval process automation'

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.