Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
6 replies
Subscribers
7 subscribers
Views
2436 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
I have a dashboard where I'm using the file upload field function for the us
robbier
over 9 years ago
I have a dashboard where I'm using the file upload field function for the user to select a local file and this populates a local variable. Later on in the form I have a button widget where I then take this local document value and run it through another function. Unfortunately it seems while the document variable is getting a value the document itself isn't "committed" into the Appian CMS and this document is not actually available for other functions in the same form. Is this expected behaviour or is there something else I need to do? Snippet of my SAIL code below:
=load(
local!document,
local!target: cons!MY_TEMP_FOLDER,
..
..
a!fileUploadField(
label: "Choose File",
labelPosition: "ADJACENT",
saveInto: local!document,
value: local!document,
target: local!target
)
...
...
a!buttonLayout(
primaryButtons:{
a!buttonWidget(
label:"Process",
disabled:if(isnull(local!document),true(),false()),
...
OriginalPostID-148018
OriginalPostID-148018
Discussion posts and replies are publicly visible
0
robbier
over 9 years ago
... value:"Processed",
saveInto:{
a!save(
target:local!result,
value:rule!processDoc(
contentFile:local!document
)
)
...
...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Conor Cahill
Certified Lead Developer
over 9 years ago
The document won't be "committed" until you've submitted the form. A workaround is to have your button submit the form and loop back into the form after you have done your rule!processDoc(). If you chain the elements together then to the end user it would look like nothing was submitted.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@robbie Hi, until and unless the form is submitted, a temporary document id is maintained. The same is mentioned in the documentation under the file upload component.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
robbier
over 9 years ago
Thanks..gotcha! So really doing this in a "single step" on one form is not doable. That's all I needed to confirm.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@robbier Yes, it's not possible as per current architecture.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 9 years ago
Further info on the file upload component can be found here:
forum.appian.com/.../SAIL_Components.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel