1 Reply Latest reply on Mar 22, 2012 8:15 AM by dohanlon

    Access values from a dropdown-list

    brasoDeveloper92

      I am trying to access the value of a dropdown-list, because i need to set the value of a numeric field according to the dropdown-lists value.

      I tried the following the code in the calculate event of the numeric field:

       

      xfa.host.messageBox(String(Tabelle1.Zeile1[1].MengeEB.rawValue));

       

      However, the messagebox isn't even called; I don't see it. Does anybody have a clue what's the reason for this?

       

      Thank you.

        • 1. Re: Access values from a dropdown-list
          dohanlon Level 3

          The messagebox isnt shown because the script is failing. [] notation in som expressions are not the same as [] acccessors in javascript, so you need to either use unique names or use resolve node to access the correct som expression since these are not javascript objects. For example:

           

          xfa.host.message( Tabelle1.resolveNode( "Zeile1[1].MengeEB" ).rawValue );