Hi - While changing value using a!save(), I see different output for a!buttonWid

Hi - While changing value using a!save(), I see different output for a!buttonWidget() and a!buttonWidgetSubmit(). Isn't it a weird behaviour? But, I am facing this issue. itemsCart is an array of defined CDT where vehicle is a field. When I code inside a!buttonWidgetSubmit() then value is coming as repeated (which is equal to number of records in itemsCart). But, I am getting correctly when I put this code inside a!buttonWidget(). Please find the attached code. I have given sample value as well. Please share your thought. Thanks.


Code.txt

OriginalPostID-167232

OriginalPostID-167232

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    I was also unable to reproduce any difference between the two styles of button; but like vinodB suggested, you might need to more tightly control what your saveInto's do.
    I've enhanced your original code in this attached snippet to provide both buttons on-form, and it will allow you to type in a new value that will be assigned to a selected line when either button is pressed. For fun I included code to force selection of only one line at a time, and it clears out the entry box between presses.

    saveInto trouble.sail

Reply
  • 0
    Certified Lead Developer
    I was also unable to reproduce any difference between the two styles of button; but like vinodB suggested, you might need to more tightly control what your saveInto's do.
    I've enhanced your original code in this attached snippet to provide both buttons on-form, and it will allow you to type in a new value that will be assigned to a selected line when either button is pressed. For fun I included code to force selection of only one line at a time, and it clears out the entry box between presses.

    saveInto trouble.sail

Children
No Data