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
7 replies
Subscribers
7 subscribers
Views
2673 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Invalid Function 'document'
fredericom
over 8 years ago
Hi all, our team want to create a validation on the fly to verify the size of a document that is uploaded. However, it's giving this error:
Error evaluating function 'document' : Expression evaluation error : Invalid function document.
Is there any way i can solve this?
Our idea is to create some validations (about the document) before the form is submitted. But, since the document ID doesn't exists before the form is submitted, we cant apply the document fucntion to retrieve some document properties.
Here is the sample code:
=a!formLayout(
label: "Lorem Ipsum",
instructions: "Lorem Ipsum",
firstColumnContents: {
a!fileUploadField(
label: "Upload resume",
instructions: "Any format is acceptable.",
target: ri!targetFolder,
value: ri!file,
saveInto:ri!file,
required: true,
validations:
if(isnull(ri!file), null, if(document(todocument(ri!file), "size") > 1000, "BIG", "SMALL"))
)
},
secondColumnContents: {},
buttons: a...
OriginalPostID-264348
Discussion posts and replies are publicly visible
Parents
0
PhilB
A Score Level 1
over 8 years ago
Just as a heads up, I've heard that the workaround suggested by venkatesh above no longer works on 17.1 - maybe worth testing though.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
PhilB
A Score Level 1
over 8 years ago
Just as a heads up, I've heard that the workaround suggested by venkatesh above no longer works on 17.1 - maybe worth testing though.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data