I'm trying to store array of files in database since it does not picks blob as a datatype any work around would be much appreciated.
Discussion posts and replies are publicly visible
You will have to store those file on Appian and then write their ID to database.
how can I do this can you please elaborate with a code since I'm a beginner.
because I'm able to store the docs in local variable array I'm having difficulty with storing in the database.
In a file upload field, set the value as a number field that might be in your CDT. Same should be the saveInto. Also, add a constant in the targetFolder of the fileUploadField in which you wat to store the document. Now your CDT field will automatically have the ID of the document. You can write that data in the DB and use it later. docs.appian.com/.../File_Upload_Component.html
Yes I have used the file upload for the multi-doc. I am able to upload multiple files in a local array and display on the screen I am having difficulty to upload it into database. I am sharing my code might help you understand what I have done and then you'll have a clear understanding of what to recommend to me. Following is the code.
/*the file upload part*/ a!fileUploadField( label: "UPLOAD FILE", labelPosition: "ADJACENT", target: cons!P_XYZ_POINTS_TO_DOCS_FOLDER, maxSelections: 10, value: /*local!docsList*/ /*ri!userRequest['recordType!{20eafdce-4cae-46cf-982b-f8f20745d009}P_XYZ_REQUEST.fields.{43660766-6686-47e3-b5b2-1035686940b5}requesteddoc']*/ local!docsList, saveInto: /*local!docsList*/ /*ri!userRequest['recordType!{20eafdce-4cae-46cf-982b-f8f20745d009}P_XYZ_REQUEST.fields.{43660766-6686-47e3-b5b2-1035686940b5}requesteddoc']*/ local!docsList, validations: {} ), /*the button that will upload in recordtype.*/ a!buttonWidget( label: "UPLOAD", value: local!docsList, saveInto: /*a!save(*/ /*ri!userRequest['recordType!{20eafdce-4cae-46cf-982b-f8f20745d009}P_XYZ_REQUEST.fields.{43660766-6686-47e3-b5b2-1035686940b5}requesteddoc'],*/ /*save!value*/ /*)*/ a!forEach( items: local!docsList, expression: a!save( ri!docs['recordType!{10edbd5a-0ae8-47a9-bda2-f80cd3efc550}P_XYZ_DOC.fields.{ad42aed6-1664-4257-97f8-1c06e7f5604b}reqDoc'], save!value ) ), style: "NORMAL" )
May I ask why you're trying to store the files in the database, and not within an Appian folder?
I am trying to make a helpdesk system to track record of complaints in order to track I would require user to upload some sort of files and for each file uploaded should be added to the database so I can track which user raised what issue along with the file uploaded
To achieve this use case, you don't need to store the file in the database. As Harshit has indicated, store the file in an Appian folder, and store the Appian Document ID along with the complaint details in the database.
the user is able to upload multiple doc how am I suppose to upload multiple doc id in the db for each user associated with the doc. I know I am a beginner and I might sound stupid right now but any help will be much appreciated.
You can create another database table for storing document IDs that also has a foreign key for storing the complaint ID. This will allow you to establish a one-to-many relationship between the 'Complaint' database table and 'Complaint Documents' database table.