Skip to main content
deepaks0008
Known Participant
Feb 23, 2021 12:24 PM UTC
Solved

Want to get Ids as {7750,6645} from multi-upload expression {fn!todocument(7570), fn!todocument(6645)}

Hi All,

How to get ids as{7570,6645} from multi-file upload expression: {fn!todocument(7570), fn!todocument(6645)}? Answer: toInteger()

is it possible to store array as {7570,6645} in DB column docID? then retrieve to display uploaded dox list on UI. Answer: using another table to store ids in each row

    danny.verb
    Employee
    Feb 23, 2021 11:58 PM UTC

    When using a file upload field, the document IDs aren't populated until the form has been submitted. Upon submission you will be able to see these values in your process model process variables where they can then be written to the database. You can store arrays in SQL by including a delimenter but it might be easier to create another database table with a one to many relationship.

    4 replies

    danny.verb
    Employee
    Feb 23, 2021 11:58 PM UTC

    When using a file upload field, the document IDs aren't populated until the form has been submitted. Upon submission you will be able to see these values in your process model process variables where they can then be written to the database. You can store arrays in SQL by including a delimenter but it might be easier to create another database table with a one to many relationship.

    mikes0011
    Brainy
    Feb 24, 2021 2:41 PM UTC
    When using a file upload field, the document IDs aren't populated until the form has been submitted

    Small nitpick here, but this isn't really accurate in current Appian versions (depending on how literally we should take this sentence i guess).  The document IDs do now populate basically immediately - they just aren't usable for much.  They *are*, however, usable for populating doc ID values within a RI or even an integer-based CDT property, which (many moons ago) wouldn't have worked due to the temporary document IDs past Appian versions used.

    The Expression Guru
    richardm900458
    Inspiring
    Feb 25, 2021 6:30 AM UTC

    very interesting piece of information.
    So they are not the  temporatry IDs any more...
    It simplifies things a bit. 
    Thank you for this Input. Pretty valuable.

    richardm900458
    Inspiring
    Feb 24, 2021 6:04 AM UTC

    idea: 

    • Submit the form
    • save the created ids into a variable
    • build a loop in the process and come back to the same form, with the now available ids