I am uploading multiple forms with a file on the interface and I need to save the document name with extension. When I tried getting the file name on the interface, it was giving me error because it cant accept lists in document function.
So after filling out the form, I created a script task to get file name and extension by using forEach function into two inputs.
Now the problem is how to save it.
I put ac!fileName_text & "." & ac!fileExtension_text and save into ri!cdt.fileName_text.
But it was only writing to the first cdt in a weird format like fileName_text (1st upload) ; fileName_text.fileExtension_text ( 2nd upload) ; fileExtention_text ( 1st upload).
Please let me know how can I fix it.
Thanks
Discussion posts and replies are publicly visible
Not sure i have all relevant details, but you could try just doing this in a single output:
a!forEach( pv!documentList, { fileName_text: document(fv!item, "name"), fileExtension_text: document(fv!item, "extension") } )
You can probably just save this into your CDT array PV and have that work -- I assume you have a CDT array PV with those properties in place.