File Upload in Interface called from another Interface or Interface called from Page that is defined as a Page in Site

Appian Family, 

Here is my Interface -- JR_InterfaceName

1) File Upload field in an interface >> Define the Target Folder with all correct permissions.

2) Submit Button: "submit" set to true.

I have 2 scenarios here

1) Just the interface by itself is just working fine when I upload the file and click submit. It gets save to the target folder.

2) When the same interface is either called from another interface as rule (rule!JR_InterfaceName) it doesn't work. The file is not saved to the target folder. I am pretty sure the document object is there but it's just not available to either save in a target folder or for anything else.

  • What is it that I am missing?
  • is it an Appian shortfall/Issue? I am assuming that this is very basic need for almost everyone.

3) Just to play around further

  • I called a Process Model using "saveinto" property of the button passing some dummy variables and the Document Uploaded from the upload control,
  • The PM got called and ended w/o issues.
  • When I looked at the Process Details, I saw the Document Object passed with the ID, but the input process variable was blank only for the document object.
  • I used the ID and used it in Document Viewer field in another Interface which worked fine, but it did not in the same interface where the upload file control was there.

Below is snippet of code

a!formLayout(
label: "Form",
contents: {
a!sectionLayout(
contents: {
a!fileUploadField(
label: "File Upload",
labelPosition: "ABOVE",
target: cons!JR_DELETE_ME,
maxSelections: 1,
value: ri!document,
saveInto: ri!document,
validations: {}
)
}
)
},
buttons: a!buttonLayout(
primaryButtons: {
a!buttonWidget(
label: "Submit",
submit: true,
style: "SOLID"
)
},
secondaryButtons: {
a!buttonWidget(
label: "Cancel",
value: true,
saveInto: ri!cancel,
submit: true,
style: "OUTLINE",
validate: false
)
}
)
)

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    All of what you observe is already discussed in great length here. File upload only happens on submit of the interface. Just adding an interface as a page to a site does not do that.

    When you nest your interface into another, you have to make sure that the rule inputs are passed into rule inputs of the parent interface.

    And again: Not submit -> no file upload.

    And yes, I know that it works a bit different in portals as there is no submit action available. But that is for portals only.

  • Hello Stefan, 

    Thank you for the response. is there a link that you wanted to paste in this response? if so can you please send again, i don't see it in the response.

    1) I do have a submit button in the form. It's just not uploading but doing things like calling a smart service.

    2) I don't have a need to send input variables between the nested interfaces. My first Interface acts just an entry for the Interface where i have the file upload control.

    Thanks, 

    JR

  • 0
    Certified Lead Developer
    in reply to janakiramk524063

    1) A button with submit enabled is not enough. Only a process start form, or a form in a user input task can be submitted.

    2) Well, only the top level interface defines which variables are passed to the process. If you want to upload a file, from a nested interface, you will have to create the required top level rule inputs and pass them down.

    appian.rocks/.../

Reply Children