dataObjects property doesn't work properly

Avatar

Avatar

arthurf48713214

Avatar

arthurf48713214

arthurf48713214

29-05-2018

Hey,

a Thank to everyone that take their time to give me answer to my questions especially to Bruce.

I have a litle problem. I want check if there are some attachments files on my form then i want gire their name if no i just want to hidde the field.

I saw some exmaples on internet with dataObjects. but when i use it on my script it send me this error.  ->

Script failed (language is javascript; context is xfa[0].form[0].Benteler3DMaster[0].TOC[0].attachedFilesName[0])

script = var myDoc = event.target;

var attachments = myDoc.dataObjects;

if (attachments !== null) {

this.rawValue = "not files found";

} else {

this.rawValue = "there are some files";

}

Error: Invalid property get operation; field doesn't have property 'dataObjects'

i use Designer aem 6.3 form.

thx

regards

Arthur

View Entire Topic

Avatar

Avatar

arthurf48713214

Avatar

arthurf48713214

arthurf48713214

29-05-2018

yes i run it in the calculate event on the server side.

there is thre error message ->  Error: Invalid property get operation; field doesn't have property 'dataObjects'.

when i initialize a variable like var doc = event.target; i dont receive any error , but when i add dataObjects i receive an error like  Error: Invalid property get operation; field doesn't have property 'dataObjects'

i changed the if statement but i receive the same error.

Arthur