2 Replies Latest reply on Feb 16, 2012 10:28 AM by srinivas1506

    Malformed SOM Expression!!??




      I have developed a interactive form (its name is 'MY_FORM_VISITOR') and its launched on the intranet's portal, fine.

      The form's some fields are prepopulated/defaulted from the back end data base/server/SAP's Oracle data base.


      But, when the form is launched on the portal browser, a small (JavaScript Debugger) popup is instantly coming and disappearing with in a fraction second.


      If i save this form on my local desktop, and then when i opens it on my local desktop, then am getting the same popup and it stayed until i closes it.


      So, i saw the below message in the popup,


      Acrobat EScript Built-in Functions Version 9.0
      Acrobat Annotations / Collaboration Built-in Functions Version 9.0
      Acrobat Annotations / Collaboration Built-in Wizard Functions Version 9.0
      Acrobat SOAP 9.0

      GeneralError: Operation failed.
      Malformed SOM expression: MY_FORM_VISITOR..

      GeneralError: Operation failed.
      Malformed SOM expression: MY_FORM_VISITOR..


      I am making some fields as mandatory (yellow coloring) and some fields as greyed out (grey color and readOnly) DYNAMICALLY by tracking/tracing/finding the field in question using the below JavaScript,


      (From this forum, i came to know that by using two periods - .. we can track/trace/point/find a field in question, so am using the same-2 periods)

      xfa.resolveNode("MY_FORM_VISITOR.." + myArrayGrey[i]).ui.oneOfChild.border.fill.color.value = "192,192,192"

      xfa.resolveNode("MY_FORM_VISITOR.." + myArrayGrey[i]).access = "readOnly";


      Pls. let me know why am getting this message? How can i fix it?


      Surprisingly, am using the same logic/JavaScript code syntax/statements in another form (Its name is just VISITOR), there i dont see any issue!!


      Thank you

        • 1. Re: Malformed SOM Expression!!??
          Soren Hoy

          Hi Srinivas

          I don't know if this helps you, but I have seen similar behavior, when you have set the dynamic properties "repeat subform for each data node" and set no minimum occurance's.

          If you the move the form and not your preview XML, you can get this error, because the subform does not exist in the forms XFA structure.


          Don't know if you ran into something like this, but hope you figure out what causes your problem-


          Søren Høy Nielsen

          Dafolo A/S

          1 person found this helpful
          • 2. Re: Malformed SOM Expression!!??
            srinivas1506 Level 1

            Thank you, but its not the cause for my issue.


            I am writing my JavaScript code below again, because in my original thread the green color is making blur in visibility,


            xfa.resolveNode("MY_FORM_VISITOR.." + myArrayGrey[i]).ui.oneOfChild.border.fill.color.value = "192,192,192"

            xfa.resolveNode("MY_FORM_VISITOR.." + myArrayGrey[i]).access = "readOnly";


            I have a scenario that: I have around 200 fields on the form, and these field properties/attributes (mandatory, grey, editable, option) are dynamic, meaning, the back end SAP's data base's interface/data view will decide whether its mandatory or optional....meaning, say, for US the field_1 is mandatory , but the same field is optional for Canada, like, they are dynamic, to achieve this i did like below


            I wrote the below code in docReady event at root level, i mean for form level (MY_FORM_VISITOR level), pls. note there are 2 dots after 'MY_FORM_VISITOR' in my JS


            // Identify all the non-editable fields and make them grey


            var myArrayGrey = new Array();

            var greyFields;


            greyFields = xfa.resolveNode("MY_FORM_VISITOR.Page1.TMReference.HiddenSub1CustInfo1.GREfields").rawVal ue

            myArrayGrey = greyFields.split(" ");

            for (var i = 0; i < myArrayGrey.length; i++)   


            xfa.resolveNode("MY_FORM_VISITOR.." + myArrayGrey[i]).ui.oneOfChild.border.fill.color.value = "192,192,192"

            xfa.resolveNode("MY_FORM_VISITOR.." + myArrayGrey[i]).access = "readOnly";



            In the above,


            The 'GREYfields' is a invisible text field on the form, holds a string data type and its prepopulated with below value, just for for example, say




            Any inpurs pls.?


            THANK YOU