Upload Multiple doc and get all docs array ids in local or ri variables

Requirement: Sore uploaded docx ids array in DB column and get array to display uploaded list on UI.

1.Upload Multiple doc and get all docs array ids in local or ri variables, how to achieve? <-- 2.Is this correct approach to store multiple docx ids as array in DB column and retrieve from DB

Using Appian documentation i was able to download multiple document from an array of {docid1,docid2,docid3}

3.How to convert? from  Appian multi upload stores i.e. {fn!todocument(6645),fn!todocument(7570)}  to expected {6645,7570} <-- 4.How to store/retrieve this docid array in DB ? how to  design DB with integer array?

5.May be I am wrong in above approach please let me know best approach to achieve above?

  Discussion posts and replies are publicly visible

Parents Reply
  • +1
    Certified Lead Developer
    in reply to Deepak Shinde

    You should be able to simply store the upload doc IDs into the appropriate property of a CDT, where the type of that property is either Integer or Document.  Either of these will store to the DB as Integer type.

    If you're trying to store multiple document IDs relating to one particular row in your DB table, the normal and more-normalized way of doing this would be to create a new table which would store one row per document ID, and basically just stores the document ID, as well as the row ID of the parent table.  Generally speaking this scales better and is more flexible than hardcoding an array of document IDs (for example stored as text) into one row of the parent table.  If you absolutely must go with the method of storing all doc IDs in a single cell of your base table, I'd consider converting the doc ID array to a JSON string, via a!toJson, prior to storing it.  This will make parsing easier later on.

Children
No Data