In my interface, I user function document.
if( document(tofolder(local!documentId), "size") > 0, true, false )
Discussion posts and replies are publicly visible
In document function, you have to provide documentId not the folder id.
if( document(todocument(ri!documentId), "size") > 0, true, false )
It also error.
show me the error along with rule input.
what is the value of local!documentId?
It has value.
Could you please show us the value of the local variable and in designer also try to see the value for the particular id.
You can use the below expression to check first.
isobjectexists("Document", local!documentId)
It must definitely have a value but that is an invalid value. Try to check the variable's value to ensure that it is a single integer value that is a valid document ID.