Forum Discussion

mayank_jain_prorigo's avatar
5 years ago

Value of field doesn't change if the field type is itemtype and have onchange event.

My scenario is after selecting any value in field 'A' which is of item type, I have to set/change the value of field 'B'. so i added a onchange event in field 'A'. like this

        const inputValue = this.value;

        window.handleItemChange('field B name', "new value" );

        return ;

so what is happening is.

1. when i select value in field A for first time. it work as expected.

2. when i change the value in field A again to different value, the value of field B changes to the new one as expected. but the value in field A does not change and remain the old one.

2 Replies

  • Hi Mayank

    I have tried the same in my instance and it is working for me.


    const inputValue = this.value;
    window.handleItemChange('name', inputValue);
    return;

    • mayank_jain_prorigo's avatar
      mayank_jain_prorigo
      Ideator II

      HI Gopikrishnan

      Thank you for looking and replying me this fast.

      but can u check couple of things

      1. the field  you have OnChange event is itemtype field.

      2. second field that u were changing can be of any type.

      then try to change the itemtype field more then 2 times. you will notice the field value of itemtype is not changing except for the first time.