• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Load Form Field from Grid using Custom Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Load Form Field from Grid using Custom Script

    How to load 2 fields on a form from a popup grid using a custom script.

    Suppose,
    FORM has FIELD1 & FIELD2
    GRID has FIELDA & FIELDB
    when we click on a Grid Row, the value from FIELDA of the GRID should be populated on FIELD1 of the FORM, and the value from FIELDB of the GRID should be populated on FIELD2 of the FORM.
    I want to do this using Custom Script.

    I am using the below script which I know is wrong.


    ===============================
    var form = getWidget('FORM');
    var varA = rec.get('FIELDA');
    var varB = rec.get('FIELDB');
    form.FIELD1.setValues(varA);
    form.FIELD2.setValues(varB);

    ===============================


  • #2
    Why not just use app variables to accomplish this?

    Comment


    • #3
      I want to explore the custom script. Did not find anything in the Guide or any document. where can I find all the necessary commands for custom scripts?

      Comment


      • #4
        Are you encountering a limitation within NAB that is prompting you to use the Execute Script? If so, what are they?

        Execute Script was introduced as a failsafe for when NAB doesn't offer the actions someone might need that NAB doesn't support yet

        Comment


        • #5
          No, we are not facing any limitations. I just want to explore custom scripting. if you can provide all the commands that would be helpful.

          Comment

          Working...
          X