mjsamberg
Rookie

File Uploads

This may be a newbie question - I have a form where a user uploads an image that I want to display on another form. I have the file upload object in my first form and have set it to allow one image only. I have extracted that file from the collection in my workflow. How do I get the URL out of that file object to use it in the second form? 

Labels: (1)
0 Kudos
Reply
6 Replies
Garrett
Contributor

Re: File Uploads

Hi @mjsamberg 

 

How about if you save the image to an online storage in the first workflow?

e.g. OneDrive, Google Drive, Box, SharePoint Online

Then retrieve the image in the second workflow.

 

IF you still want to just pass the URL, perhaps you can save it into a SPO List

 

Question: What is the event or trigger for the second workflow? (aka When do you run the second workflow?)

Question: How do you relate both the workflow?

0 Kudos
Reply
Gavin-Adams
Explorer

Re: File Uploads

@Garrett great idea on that solution to display the original attachment as an image.

If you use a store a file type action that outputs the URL as part of the object, that would save an extra action from getting the file URL.

 

For example

NWC workflow is start form, image submitted as attachment.

Sharepoint online (SPO) store a file action to a document library.

https://help.nintex.com/en-US/nwc/Content/Designer/Actions/SharePointOnline-StoreaFile.htm

 

This would have an object variable as the output.

You can then reference the file URL from the SPO object in the image control on the task form in an Assign a Task action.

 

The only elements you will need to allow for are the looping around possible multiple attachments and that the person viewing the task form would need permission to the sharepoint document library.

 

0 Kudos
Reply
mjsamberg
Rookie

Re: File Uploads

So here's the dilemma... For this workflow, is for legal name changes. We want to be able to give the user the option to upload a photo of their driver license to confirm their identity. In the next screen, I want to be able to display that on the approval form for the HR manager to be able to review it and approve the request.

 

I could use a Sharepoint list with an image file type or upload to a file in a library, but how would you retrieve it without making that folder public? 

0 Kudos
Reply
Garrett
Contributor

Re: File Uploads

Hey @Gavin-Adams, thanks for the great example to store to SPO document library.

How can we get in touch for a chat?

 

@mjsamberg wants the URL variable in the second workflow. Hence that is why I asked how the second workflow is going to be triggered. 

Even if the second workflow is called from the first workflow, I don't think that the variable is passed on (or its passed on but not passed back, can't remember. Platform is Nintex WorkFlow 0365)

Garrett_1-1655862458146.png

 

Hence, I asked how the second workflow is to be triggered. Without knowing that, I don't have enough information to provide a suggestion or solution. 

 

 

0 Kudos
Reply
Gavin-Adams
Explorer

Re: File Uploads

@mjsamberg 

As it is an image it will be easier to deal with the file as a document in a document library rather than an attachment to a sharepoint list item.

 

Given the scenario, for review by HR manager, I would create a dedicated site collection in sharepoint online. Only the HR manager needs access to that plus the user account you have for the Sharepoint online library connection. I often create a dedicated Nintex service account in Azure AD and use that account to establish the connections to sharepoint online from NWC. Then I add the nintex service account as a site collection admin or in the site owners group for the site collection.

 

So it would be:

  • NWC start form - employee submits form for change of name with image attached.
  • Workflow, loops through attachments from start form and stores image in document library (HR manager has read access to document library). Store a file action has object output variable
  • Optionally workflow create sharepoint list item in the same site collection if you want of a record of the submission.
  • Assign a task action with task form assigned to HR manager. Task form has image control with reference to file url for SPO store a file object variable.
  • Outcome of task action to approve trigger some business process to complete the name change.

 

For your requirement I do not see a need to have a seperate workflow to display the image to the HR manager.

Reply
Garrett
Contributor

Re: File Uploads

Hi @mjsamberg 

 

Anyway, you just need a single workflow. What @Gavin-Adams suggests is the better solution for you (Great job!). However do NOT store the image. You can just retrieve the file URL and use it for display in the Task Assign form (for HR Manager).

 

This part below

Garrett_0-1655865517490.png

Source: @Gavin-Adams 

Again, I strongly suggest to NOT store the image.

 

Pls note that the image will still be in this workflow instance. Refer to this video on Business Owner

 

Hope that helps

0 Kudos
Reply