Hi,
i have to upload multiple files how can i achieve this without using for loop and the RI to store the files in the db
Discussion posts and replies are publicly visible
a!formLayout( label: "Upload File", contents: { a!sectionLayout( contents: { a!fileUploadField( label: "File Upload", instructions: "Only xlsx and csv file allowed", labelPosition: "ABOVE", target: cons!MP_UPLOADED_FILE, fileNames: substitute(fv!file.name, " ","_"), fileDescriptions: fv!file.name &" "&" uploaded", maxSelections: 2, value: ri!document, saveInto: {ri!document}, required: true, validations: a!localVariables( local!invalidExtension: difference(upper(fv!files.extension),{"XLSX","CSV"}), { if( local!invalidExtension>0, "Attachments must be xlsx or csv. Remove: " & index(fv!files, "name", wherecontains(local!invalidExtension, upper(fv!files.extension)),{}), "" ) }), buttonStyle: "SECONDARY" ) } ), a!sectionLayout( label: "", contents: {} ) }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidget( label: "Submit", submit: true, style: "PRIMARY" ) }, secondaryButtons: { a!buttonWidget( label: "Cancel", value: true, saveInto: ri!cancel, submit: true, style: "NORMAL", validate: false ) } ) )
You can try this code, you can configure a rule input for document and make it array. The target is the constant for folder