Skip to main content
deepaks0008
Known Participant
February 23, 2021
Solved

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

  • February 23, 2021
  • 4 replies
  • 0 views

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

    Best answer by danny.verb

    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
    Brainy
    February 23, 2021

    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
    February 24, 2021
    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
    February 25, 2021

    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
    February 24, 2021

    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