# Updateable BAQ - Select All and Update All

**URL:** <https://www.epiusers.help/t/updateable-baq-select-all-and-update-all/88865>\
**Category:** Kinetic ERP\
**Tags:** kinetic, epicor\
**Created:** [March 25, 2022, 2:55pm UTC](https://www.epiusers.help/t/updateable-baq-select-all-and-update-all/88865 "2022-03-25T14:55:57Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stevensi1018](https://www.epiusers.help/user_avatar/www.epiusers.help/stevensi1018/32/63142_2.png) [@Stevensi1018](https://www.epiusers.help/u/Stevensi1018)\
**Post date:** [March 25, 2022, 2:55pm UTC](https://www.epiusers.help/t/updateable-baq-select-all-and-update-all/88865/1 "2022-03-25T14:55:57Z")

</div>

I have a dashboard that has an updateable BAQ. The BAQ often shows 50-60 jobs and we need to close them all

In epicor 10, I did a customization which had a button. When clicking on the button, it would loop in the grid and check the ‘JobClosed’ checkbox for all lines. It would then call the Update and Refresh action. It worked really well

However, in Kinetic, I don’t know how I’m supposed to loop through all rows to set the value. Is there any option other than creating a function? If I create a function, I would have a function + the update code in the BAQ so it would be a duplicate

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [March 25, 2022, 8:04pm UTC](https://www.epiusers.help/t/updateable-baq-select-all-and-update-all/88865/2 "2022-03-25T20:04:44Z")

</div>

You can make a call to a custom action in the BAQ. Look up custom action and put your code in there instead of in the customization. Then you can hook that up to a button in kinetic.

 ![image](https://www.epiusers.help/uploads/default/original/3X/d/5/d5142f1e86268c7fe8cc5d04dca140e81a2982b5.png)

---

<div class="post-metadata">

**Author:** ![Stevensi1018](https://www.epiusers.help/user_avatar/www.epiusers.help/stevensi1018/32/63142_2.png) [@Stevensi1018](https://www.epiusers.help/u/Stevensi1018)\
**Post date:** [March 28, 2022, 1:37pm UTC](https://www.epiusers.help/t/updateable-baq-select-all-and-update-all/88865/3 "2022-03-28T13:37:31Z")

</div>

That’s great to know, thanks!

However, I have some further questions:

- When I add a custom action in my BAQ, it should show in Action Data directly or I have to add it ? I deployed the Dashboard and reloaded it in Kinetic and I only see the Update action from the BAQ
- I guess that if I only want to update some rows (not ALL rows), I have to add a parameter to the BAQ. That’s not a problem but even if I configured the parameter to subscribe to the ‘ProjectID’ column of the above grid, it still asks for the BAQ parameter every time I refresh my Dashboard. Is there any ‘silent parameter’ in Kinetic to bypass that?

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [March 28, 2022, 1:43pm UTC](https://www.epiusers.help/t/updateable-baq-select-all-and-update-all/88865/4 "2022-03-28T13:43:26Z")

</div>

> [@Stevensi1018](#):
>
> When I add a custom action in my BAQ, it should show in Action Data directly or I have to add it ? I deployed the Dashboard and reloaded it in Kinetic and I only see the Update action from the BAQ

It should show up. I’m assuming you used the “Define custom actions” button, as well as adding the BPM?

> [@Stevensi1018](#):
>
> I guess that if I only want to update some rows (not ALL rows), I have to add a parameter to the BAQ. That’s not a problem but even if I configured the parameter to subscribe to the ‘ProjectID’ column of the above grid, it still asks for the BAQ parameter every time I refresh my Dashboard. Is there any ‘silent parameter’ in Kinetic to bypass that?

You control that in your code. You loop through your data set and choose what you want to edit. Usually you filter for updated rows only, and trigger that with a check box or something that you add into your BAQ. While you could use a parameter, I don’t see why that would be a necessity.

---

<div class="post-metadata">

**Author:** ![Stevensi1018](https://www.epiusers.help/user_avatar/www.epiusers.help/stevensi1018/32/63142_2.png) [@Stevensi1018](https://www.epiusers.help/u/Stevensi1018)\
**Post date:** [March 28, 2022, 2:12pm UTC](https://www.epiusers.help/t/updateable-baq-select-all-and-update-all/88865/5 "2022-03-28T14:12:09Z")

</div>

> It should show up. I’m assuming you used the “Define custom actions” button, as well as adding the BPM?

You’re right. Just discovered this as you answered and it show directly in my Kinetic App once I deployed the Dashboard

> You control that in your code. You loop through your data set and choose what you want to edit. Usually you filter for updated rows only, and trigger that with a check box or something that you add into your BAQ. While you could use a parameter, I don’t see why that would be a necessity.

My problem was that I thought that even if the grid was filtered, that it wouldn’t be filtered in the BAQ custom action and it would loop on all rows. I just tested with no parameter and my custom action only looped on the rows with the ProjectID that was shown in the kinetic dashboard so it’s perfect I’ll be able to check the column on there and then call the Update method from my BAQ

Thanks again for the help, really appreciated as I begin my understanding of Kinetic development !! 🙂

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [March 28, 2022, 2:14pm UTC](https://www.epiusers.help/t/updateable-baq-select-all-and-update-all/88865/6 "2022-03-28T14:14:08Z")

</div>

Yeah, the tracker filters actually parameterize the results in the back end when it can, otherwise performance would be horrible if it returned all the rows and filtered after that. Glad you got it figure out!

---

<div class="post-metadata">

**Author:** ![Stevensi1018](https://www.epiusers.help/user_avatar/www.epiusers.help/stevensi1018/32/63142_2.png) [@Stevensi1018](https://www.epiusers.help/u/Stevensi1018)\
**Post date:** [March 28, 2022, 7:46pm UTC](https://www.epiusers.help/t/updateable-baq-select-all-and-update-all/88865/7 "2022-03-28T19:46:03Z")

</div>

For some reason, the row isn’t considered ‘updated’ when I call my custom action. I changed a field and I changed RowMod to ‘U’ but even in my BAQ Designer, when I execute my custom action then click on Update in the Analyse tab, I get this error:  
 ![image](https://www.epiusers.help/uploads/default/original/3X/2/a/2a5d2fa3a3770d35a577cc5475d7cdbcb468816e.png)

Is there anything else that I need to change on my queryResultDataset.Results to make it works ? I want to have my custom action + my code in Update processing in my BAQ. Technically I could put the same code from the Update method in my custom action but I was wondering if it’s a simple fix

Edit:

```auto
foreach(var row in queryResultDataset.Results)
{
  if(row.JobHead_JobClosed == false)
  {
    row.JobHead_JobComplete = true;
    row.JobHead_JobClosed = true;
    row.RowMod = "U";
    row.SetRowState(Ice.IceRowState.Updated); //Try that to modify the row but it doesn't seem to work
  }
}

```

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [March 28, 2022, 8:21pm UTC](https://www.epiusers.help/t/updateable-baq-select-all-and-update-all/88865/8 "2022-03-28T20:21:40Z")

</div>

So it checks the box in the UI (you can see the box checked) but you are getting this error? Also, did you try not setting the row mod? I’ve had time where trying to set it actually messed things up.

---

<div class="post-metadata">

**Author:** ![Stevensi1018](https://www.epiusers.help/user_avatar/www.epiusers.help/stevensi1018/32/63142_2.png) [@Stevensi1018](https://www.epiusers.help/u/Stevensi1018)\
**Post date:** [March 29, 2022, 12:50pm UTC](https://www.epiusers.help/t/updateable-baq-select-all-and-update-all/88865/9 "2022-03-29T12:50:41Z")

</div>

Yes it checks the box in the UI but it doesn’t flag her as updated. I just tried not setting row mod, not setting rowstate and still the same error.

It’s not much of a problem since I just copy-pasted the code from my update bpm to the custom action bpm but if someone has the same problem and find a solution someday, please comment back, it would help!

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [March 29, 2022, 1:18pm UTC](https://www.epiusers.help/t/updateable-baq-select-all-and-update-all/88865/10 "2022-03-29T13:18:15Z")

</div>

I guess I usually just do the update within the the custom action, but then again, I usually roll my update nowadays because my projects seem to usually be more complex.
