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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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
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
Thanks David, I have added your suggestion into the Q&A wiki of the 'Approval process automation'