You are viewing limited content. For full access, please sign in.

Question

Question

Clear forms upload field using SQL Query...

asked on June 11, 2023

Hi, We have a case where we need to clear/reset one of the upload fields on the form from workflow. So that it can be reused to upload new file. We have a workflow Service Task just before assigning a task to user where we want to achieve this. There is no activity in workflow to clear out or make the upload field DBNULL just like we can do with other variables. So we have no option other than writing a delete command in SQL Server to clear its attachment.

Can someone write for us a delete query to do that?

 

Note: We tried to do this using Javascript as mentioned in different posts in forums but didn't work as we are using LF 11. Also we are not sure if Javascript will work the same way on mobile App. So we don't want to follow this approach.

0 0

Replies

replied on June 12, 2023

Workflow could not be used to update file upload field value in Forms.

We don't recommend using SQL query to update field value as it may cause history inconsistency.

Would you consider adding another file upload field to user task form to let user upload on the new field?

0 0
replied on June 12, 2023

Communication may happen back and forth multiple times. I'm not sure if creating new upload fields will make a sense. Any workarounds?

0 0
replied on June 12, 2023

Unfortunately, the Javascript that is available on the Layout Designer (new designer) via the LFForm object is currently limited regarding what it can do with the upload fields.  According to the help files, it isn't possible to set the values on the upload field.

Therefore, I think you're going to be limited to utilizing the Classic Designer in order to have it's Javascript access.

0 0
replied on June 12, 2023

JavaScript doesn’t work in LF Mobile App. We have tried it with classic form. Our users use LF mobile App too. So that will be a problem.

0 0
replied on June 12, 2023

Could you provide more information?  I have one form that submits, then clears (with a workflow), then goes back to the previous task for another submission. This seems to work for us.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.