Hi all,
I have a file upload SAIL component and I only want it to be visible when a certain condition is true.
a!fileUploadField( label: "Upload Documents")
I would like it to only show when the stage is 2, and I wrote the following SAIL code but it doesn't seem to be working.
ShowWhen: if(local!formStage = 2, true, false)
Ehm, what is the correct syntax for setting the visibility property?
Thanks.
Discussion posts and replies are publicly visible
The syntax works for me. You may want to check if the fileUpload SAIL component and/or the local variable is in the with() section of your form, otherwise, changes to the local variable won't affect the visibility of the file upload component as intended
Just to follow up as it'll save you loads of typing in the future. You do not need the while if() statement. Since local!formStage=2 is either true or false, that's all you need to test:
ShowWhen: local!formStage = 2
It's much easier to read as well!