Question - Using Selectable Grid in Kinetic App to Update Rows

Hello everyone,

I am trying to create a new Application in Kinetic and have the basic layout created and my grid being filled by a BAQ. I enabled selectable in the Grid Model and now it is showing the checkboxes in each row as expected.

What I am trying to accomplish from here if you reference the attached screenshot, to create an OnClick event for the Button displaying as “Add to Schedule” that when it is pressed any rows which are checked off will update the corresponding rows in the JobHead table with the value which is entered from TextBoxLoadNum → JobHead.UserChar1, the value from DatePickerScheduleDate → JobHead.UserDate1, and JobHead.CheckOff01 → true.

My initial concept which I may be wrong as this is my first foray into Application Studio is to have the BAQ that fills the grid as an updatable BAQ with the three editable columns hidden, and when the button is clicked fill these columns with the data pulled from the two controls at the top of the grid into any row that has the select box checked off, set JobHead.CheckOff01 to true and then commit the update.

Can this be accomplished strictly through widgets within the Event Builder or am I better off going the direction of calling a function from the event to perform these actions?

Any help or direction towards further reading on this would be greatly appreciated!

You can do this using events … but that’s a lot of logic for a client-side event.
I would recommend putting as much of that as possible into a function.

I am new at this too, so I will throw out my idea to see if that offends someone else more knowledgeable into answering :sweat_smile:
In your event, use a dataview-condition to get all the rows that are checked, then the iterative event will go through each item passing the key (just the job number?) and the data from your controls at the top of the grid to a function that GetByID the job, makes the change, then Update

I would hope that there is a better way - makes for potentially a lot of calls (one for each job selected) … but this way, it’s doing all the Get and Update calls from the server, instead of from the client.