Hi everyone!
I am trying to configure a new screenflow to have it's Uploaded File's name mapped into a text field. I tried creating a Variable (Text-Collection) and added an Update Records element after the screen in an attempt to map it, but I can't get it right.
What am I doing wrong here?
#Flow #Screen Flow #Flows
your flow is basically right — the only broken piece is the GetFileName filter value. In that resource picker you're currently on 'Related Record ID', which is the record you attached the files to, not the uploaded file. Instead pick the Upload File component's 'Content Document IDs' output (Upload File > Content Document IDs) — that's the list of the uploaded files' Ids. Also change the operator from Equals to In, since that output is a collection: the condition should read Content Document ID In → Upload File > Content Document IDs. Equals against a collection is exactly why nothing matched. Your Title mapping is already right — Title lives on the ContentDocument record, which is why 'Content Document from GetFileName > Title' works in AddAttachmentName (Title = file name without the extension; add FileExtension if you need the .pdf/.docx part). On multiples: with 'Only the first record' selected you'll capture just the first file's name. If a partner uploads 2+ files and you want them all, switch GetFileName to 'All records', add a Loop over it, and in an Assignment append each 'Loop > Title' (plus a comma) into a Text variable, then map that variable into File Name. If one name is enough, first-record is perfect as-is. Give that a try — it should populate.