Validate uploded document size getting error message saying that Invalid function fileUploadField_17r1

We are on 17.1 version of Appian, I have a requirement to validate the uploaded document size

I have a requirement to validate the uploaded document size. Once the user has uploaded the file needs to be validated before submitting the form. so here I can not use document function.

tried several approaches like

a!fileupload(

value:ri!document,

target:"ABC LOCATION"

).uploadedDocumentSize

the above approach is working in expression rules but at run time it is giving me an error saying that text can not convert to Layout.

Approach 2

a!fileUploadField_17r1(
value: ri!document
).uploadedDocumentSize

 

Above approach is giving error message saying that Invalid function fileUploadField_17r1

 

  Discussion posts and replies are publicly visible