Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Code on subtable don't work?

Help
2009-07-02
2013-04-16
  • Carlos Ramos
    Carlos Ramos
    2009-07-02

    Hi, I'm seeing and probe the video example "Create subtable" , and i'd like check field "PartNumber" for the value start in "K". I have probe to add code on subtable "ProductsDistributors", and the check work for table root but when i use the form master/detail. How to do it?

    Thanks.

     
    • Hi, when using subtable the code run only on the root table, Hence if you want to check a subtable column you must write code on root table like the following example:

      beforeSetValue(e){
          if (e.getTable()==thisTable){
              ...... //check for root table
          }else if (e.getTable()==thisTable.getSubTable("Distributors")){
              ...... //check for root subtable Distributors
          }
      }

      For any question don't hesitate to contact me
      Danilo

       
    • Carlos Ramos
      Carlos Ramos
      2009-07-03

      Cool.

      Thanks you very much.