Multiple Reactive Upload widgets on a screen all show the first file name
Application Type
Reactive
Service Studio Version
11.9.1 (Build 33435)
Platform Version
11.8.2 (Build 15398)

I am trying to create a form in a Reactive app with more that one Upload widgets on the screen, treated as separate form fields. However, it seems any Upload widgets displayed after the first instance display the first instance's File Name, even though their inputs are unchanged.

This seems like a bug with the Upload widget itself, so can this be fixed, or is there a work around that still lets me have two Upload widgets on one screen?

I have attached my OML with an example.

Steps to reproduce:

  1. Create a form with two Upload widgets bound to different Inputs and display both File Name attributes in their own Expressions (Or download the attached OML)
  2. Upload a file in the first Upload input
    • Result: The file name in the first Upload widget and the Expression is correct, but the second untouched Upload widget is now showing the same file name
  3. Upload a different file with a different name in the second Upload input
    • Result: The file name in the Expression is correct, but the Upload widget text still shows the first file name

Screenshot of the bug:

Screenshots of the Inputs:


UploadWidgetBug.oml

Solution

Hello Emma,

 It is not bug with the Upload widget . There is a small mistake in List C document Expression 

Check the value of that expression .It is 

If(FileUploadB.FileName = "", "Select file", FileUploadB.FileName)

It shoud be

If(FileUploadC.FileName = "", "Select file", FileUploadC.FileName)

Try this it will work.


Regards ,

Nilam Patil

Hi Nilam,

I'm not sure where you are seeing that expression, the expression for the List C document in UploadWidgetBug.oml I uploaded is:

"File Name: " + FormatFileName(FileUploadC.FileName)

And FormatFileName's (Input FileName) function expression is:

If(FileName = "", "No file selected", FileName)

Also, that doesn't explain why the second Upload widget is showing the same file name as the first Upload widget when they are bound to different attributes?

mvp_badge
MVP

Hi Emma,


You had the Filename expression for file B in the C and D:




I fixed it, now it should be good in the OML in attachment.


Hope it helps.


Regards,
João

UploadWidgetBugFixed.oml

This is strange, because I re-downloaded my OML and it doesn't use that expression

mvp_badge
MVP

You're seeing the expression FileName: FileName (on the red cross below) while your issue was on the Select File expression (on yellow):


Cheers,
João

Oh, I see! So when I copy/pasted the Upload widget and bound the second one to a different FileName attribute, it didn't automatically update the expression (like it does on a brand new Upload widget)! Ok, I thought it was built into the widget itself. That explains it, thanks!

mvp_badge
MVP

Yes, that was it.


I'm glad I could help :)


Regards,
João

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.