AnswerBun.com

How to add a decision element for a file upload in a FLOW to check whether the file was uploaded successfully

Salesforce Asked on December 4, 2020

I am trying to display a finish screen after a file upload which should be displayed only if the file upload was a success, so need to add a decision element.I tried using a text collection variable for the document Id in file upload and checking if it’s not null in the decision element but it doesn’t work

One Answer

When I did this about 6 months ago, I manually mapped the contentDocumentIds to a collection variable. It ought to work without that, but I went the manual route, and I would like to believe that was for a good reason.

Then I used an assignment element to set a number variable equal to the size of the collection variable via the equals count operator.

The decision evaluates the number variable and routes to an error screen if no attachment was uploaded.

Not so elegant, but it works. Screenshots below

flow overview

overview

manual mapping (for file upload element in scrUploadFile)

manual mapping

assignment asstSetLength

assignment element

Answered by gorav on December 4, 2020

Add your own answers!

Related Questions

Live Agent REST and CORS

1  Asked on December 16, 2020 by bern-rudisill

   

WHERE condition in FeedTrackedChanges subquery

1  Asked on December 15, 2020 by helvio

   

Channel Address Order in Email Sends

1  Asked on December 7, 2020 by user44880

     

LWC Cards carousel

1  Asked on December 6, 2020 by starhunter

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir