Support Article
Unable to attach file using FilePath control in modal screenflow
SA-76364
Summary
The FilePath control does not work for a screen flow that is run in a modal window. The file is not saved in the ServiceExport directory and the pxRequestor.pyFileUpload remains blank.
Error Messages
There has been an issue; please consult your system administrator
Steps to Reproduce
- On the User portal, include a button to launch a screen flow in a modal dialog with a temporary work object.
- On the last assignment of the screen flow, include the FilePath control and to attach a document.
Root Cause
The FilePath control used Form submission for the file upload. In this case, since FilePath does not have any form tag associated with it, it does not submit the data. A FilepathWithForm control can be used for modal or overlay cases.
Sicne this is a screen flow, some steps are configured in the flow which is launched in a modal. When the file is selected, the file path value is set. When the screen is moved to the next step, the modal Document Object Model (DOM) is replaced. Since the file path value is not present in the DOM, the file is not uploaded on submission of the modal.
This behaviour is as per the configuration. The file path DOM must be present when the modal is submitted.
Resolution
Perform the following local-change:
The file upload must occur before navigating to the next step. This is performed by using a Refresh this Section configuration.
- Create a FilePathWithForm control to wrap the FilePath control in Form tags and use this new control in the section.
- Configure a Refresh Section action on the control.
Published August 19, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.