Issue while getting document name by passing documentId
Hi,
I am trying to get the document name by passing the documentId. If I am fetching the documentid into a local variable and pass, then I am getting an error. Where as when I pass the documentId number manually, I am getting required output.
Not sure what is wrong. Do I need to do any kind of conversion before assign to a local variable.
a!localVariables(
local!templateDetails: rule!LC_getTemp(Key: 4),
local!documentId: index(local!templateDetails, "documentid",null()),
local!documentId
/*document(local!documentId,"name")*/
)
When I try to execute below code, I am getting below output.

a!localVariables(
local!templateDetails: rule!LC_getTemp(Key: 4),
local!documentId: index(local!templateDetails, "documentid",null()),
document(local!documentId,"name")
)
Whereas when I try to execute the above code, I am getting the below error. Can someone advice here.

