Setting Attachment URL to a column of the same list item

I have a partner asking how to bring the URL of an attachment from a list item to the task form, allowing the approver to click the url to open the attachment. I recalled something I have done before which I haven’t got a chance to blog it for sharing. So, here I am trying to extract part of the previously done workflow that is relevant for the objective of the discussed topic – “Assigning the attachment URL to a column of the same list item”.

1. In the solution, I have a list with a column named “PictureUrl” (i.e. Single line of text) as shown in below diagram (i.e. this column is what I will need to store the attachment URL).

2. Upon the form saved, a workflow will be triggered to perform series of actions, I am capturing only the main logic here that are relevant to the objective of updating the list item with the attachment Url. The workflow starts with the below actions and its respective configuration as shown in the table followed:

Workflow Action Configuration

3. The workflow is continued with the following actions and its’ respective configuration to kick start a loop for updating the URL to the list item properties:

Workflow Action Configuration

4. In the loop, the following action is called to get the attachment Url

Workflow Action Configuration

5. That follows with below actions to assign the URL to the defined “PictureUrl” column

Workflow Action Configuration
Note: Don’t worry about the Note and Picture columns here, what we need is just the PictureUrl to be assigned for the purpose of the discussed topic today.

6. Finally, the loop is ended with the following loop related actions

Workflow Action Configuration

That’s all we need to get the job done. Hope this helps for those who are looking for the same.