Setting a file uploaded in a form as a variable

cancel
Showing results for 
Search instead for 
Did you mean: 
JasonUofA
Customer

Setting a file uploaded in a form as a variable

Jump to solution

Hello,

I'm building a process where a user uploads a completed document as part of a user task. I need to define that uploaded form as a variable so I can use it in another task later on that emails a different user with that uploaded documented as an attachment (this function was built by our development team).

How would I go about defining the uploaded document as a variable?

1 Solution

Accepted Solutions
JasonUofA
Customer

Re: Setting a file uploaded in a form as a variable

Jump to solution

I worked with our developers and found the bug on our side. It was a variable error in a template that wasn't being reported as an error.

Thank you very much to everyone who responded.

View solution in original post

5 Replies
abbask01
Senior Member

Re: Setting a file uploaded in a form as a variable

Jump to solution

How do you set the file?

if you are using Attach file form field from the form designer, then the document uploaded in the process can be accessible throught the unique id of the field defined. now this variable will only point to the document id, simple use related document service to fetch the document.

Regards,
Abbas
JasonUofA
Customer

Re: Setting a file uploaded in a form as a variable

Jump to solution

Thanks abbask01 for the reply.

The email attachment task that my developers build use the related document service to get the document. The task is working with a call earlier in the process with a Generated Document, presumably because that tasks allows for the specific identification of the document as a variable.

My problem is that when I try to call the document via the form field id I'm getting a null value returned. Even weirder is it was working with the uploaded document using the form field id up until a few days ago.

EddieMay
Alfresco Employee

Re: Setting a file uploaded in a form as a variable

Jump to solution

@JasonUofA wrote:

...

My problem is that when I try to call the document via the form field id I'm getting a null value returned. Even weirder is it was working with the uploaded document using the form field id up until a few days ago.


Has anything changed with the environment or something similar (like permissions, etc) in the last week? Code rarely stops working without some external variable changing and triggering the failure.

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
JasonUofA
Customer

Re: Setting a file uploaded in a form as a variable

Jump to solution

I worked with our developers and found the bug on our side. It was a variable error in a template that wasn't being reported as an error.

Thank you very much to everyone who responded.

EddieMay
Alfresco Employee

Re: Setting a file uploaded in a form as a variable

Jump to solution

Hi @JasonUofA 

Great news that you've resolved your issue & thanks for updating us.

Take care,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!