Hi @ajayifs
Can you please share your configurations? Screenshots would be helpful
Cheers!
hi @Shneor Cheshin Kindly see the screenshots in previous comments. and revert what is missing for this to work,
Hey @ajayifs
Try wrapping the parameter with quotes. ‘@task_id’ instead of @task_id
Cheers!
Hi @ajayifs
When possible, I think it is better practice to use an XML update instead of a direct SQL action. That way, the insert can go though a policy. It also wouldn’t require an elevated permission to execute the message.
You could try something like this (replace the view name with your custom view, of course):
<perform_batch>
<sequential_dependent>
<hierarchy_select result_name="attachmentlookup" max_rows="1">
<primary_table>c_(--some custom view--)_view</primary_table>
<attrs>
<attr>c_(--some custom view--)_view.attachment_id</attr>
<attr>c_(--some custom view--)_view.task_id</attr>
</attrs>
<from>
<table>c_(--some custom view--)_view</table>
</from>
<where>
<data_constraint>
<constraint>
<left_operand>c_(--some custom view--)_view.task_id</left_operand>
<operator>eq</operator>
<right_operand>@task_id</right_operand>
</constraint>
</data_constraint>
</where>
</hierarchy_select>
<update_task_attachment>
<task_attachment>
<attachment_id xpath_node=" hierarchy_select_results@result_name='attachmentlookup' ] attachment_id"/>
<task_id>@task_id</task_id>
<insert is_initialized="False"/>
</task_attachment>
</update_task_attachment>
</sequential_dependent>
</perform_batch>
Cheers,
James