Document Name Storing with document name, extension and size instead of only document name.

Hi,

I am validating just uploaded document size  with below code:

if(
rule!APN_isBlank(ri!documentId),

{
fullName: null(),
name: null(),
ext: null(),
size: tointeger(null())
},

a!localVariables(

local!value: a!fileUploadField(value: todocument(ri!documentId), target:cons!RMO_FOLDER_ALL_DOCUMENTS, fileNames: fv!file),

local!fileDetails: tostring(local!value.contents.value.filename),

local!fileName: extract(local!fileDetails, "[name=", ", extension" )[1],
local!fileExt: extract(local!fileDetails, "extension=", ", size")[1],
local!fileSize: tointeger(extract(local!fileDetails, "size=", "]")[1]),
{
fullName: local!fileName & if(rule!APN_isBlank(local!fileExt), "", "." & local!fileExt),
name: local!fileName,
ext: local!fileExt,
size: local!fileSize
}
)
)

Issue: After clicking on submitting button, document name storing as [name=Document Name, extension=docx, size=3752844] instead of only document name in KC.

Can anyone let me know how to store only document name instead of all above details in KC.

  Discussion posts and replies are publicly visible