• Jacob Edelman
    September 23, 2016 at 9:09 am #2748

    I am trying to follow the second example in this article (adding a row to a table using events and a modal)

    https://salientprocess.zendesk.com/hc/en-us/articles/205605278-Adding-Rows-to-a-Table-Dynamically-

    But when I click the “Add Address” button in my modal, I get this error int he console:

    Error in [eventON_CLICK] inline event handling logic for view /Button4 (UID=72)a.log.error.a.log.error @ bpmext.js?build=201603010311:15a.a.executeEventHandlingFunction.a.a.qb @ bpmext.js?build=201603010311:55_instance.btn.onclick @ BPMExt-Control-Button.js?build=201603010311:14
    bpmext.js?build=201603010311:15 TypeError: Cannot read property ‘Va’ of null

    The on change event for the Add Address button in the modal is:

    ${../Table_Addresses}.appendElement({“address1″:${NewAdd_Add1}.getText(),”address2”:${NewAdd_Add2}.getText()});${Modal_AddAddress}.hide();

    Any ideas?

    SPARK Support
    September 23, 2016 at 9:57 am #2753

    Hey Jacob,

    Try removing the ../ from the table control reference. So your code should look like:

    ${Table_Addresses}.appendElement({“address1″:${NewAdd_Add1}.getText(),”address2”:${NewAdd_Add2}.getText()});${Modal_AddAddress}.hide();

     

    -Erick Q

    Jacob Edelman
    September 23, 2016 at 11:31 am #2756

    When I remove that portion, I get this error:

    Error in [eventON_CLICK] inline event handling logic for view /Button4 (UID=78)a.log.error.a.log.error @ bpmext.js?build=201603010311:15
    bpmext.js?build=201603010311:15 Error: View ‘Table_Addresses’ from view <root> is not found (if it is not loaded yet, this is not an error)

    Jacob Edelman
    September 26, 2016 at 12:48 pm #2771

    OK, I got this to work now.  I also got an edit row to work with the following code in the event for on row selection:

    ${Data_SelectedAddress}.setData(row.data);${Data_SelectedAddressIndex}.setData(${Table_Addresses}.getSelectedIndex(false));${Modal_EditAddress}.setVisible(true);

    I was hoping to do all the work client side but had to rely on server side for when the row edit is complete and writing back to the list of addresses BO.

    SPARK Support
    September 26, 2016 at 2:40 pm #2776

    Hey Jacob

    We’re glad to hear you got it working.

    -Erick Q

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search