Hi Team,
When using file upload I am saving the data in the database like:
a!fileUploadField( label: "Attach files", labelPosition: "ABOVE", target:cons!MPPCONSFLDR_SAMDocuments, maxSelections: 1, value:fv!item.documentid, saveInto: {ri!item.documentid, a!save(ri!item.documentid,tointeger(ri!item.documentid))
}, validations: {}
From the above code, I am uploading the file and saving it into the database in integer form.
now I want to retrieve that data and get the perfect link to that file, how can I get that?
Can I make the link of the file from this integer? if yes then how?
if no? then what can I use to save the direct uploaded file link in the database?
Discussion posts and replies are publicly visible
As Chris already mentioned - your double save won't actually do anything, because the uploaded document ID will be cast to whatever type "ri!item.documentid" is, whether it be integer or document, regardless of how you execute the save.