# From BAQ to UD Table

**URL:** <https://www.epiusers.help/t/from-baq-to-ud-table/82757>\
**Category:** Epicor ERP 10\
**Tags:** baq, bpm, epicor\
**Created:** [September 20, 2021, 7:47pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757 "2021-09-20T19:47:49Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Will79](https://www.epiusers.help/letter_avatar_proxy/v4/letter/w/ea666f/32.png) [@Will79](https://www.epiusers.help/u/Will79)\
**Post date:** [September 20, 2021, 7:47pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/1 "2021-09-20T19:47:49Z")

</div>

What is the most efficient way to take data from a BAQ to populate a UD table?

---

<div class="post-metadata">

**Author:** ![cfinley](https://www.epiusers.help/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cfinley](https://www.epiusers.help/u/cfinley)\
**Post date:** [September 20, 2021, 8:07pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/2 "2021-09-20T20:07:56Z")

</div>

Probably a UBAQ BPM. You could get your result set formed in your BAQ, then create a Post Proc BPM on the GetList method of the BAQ to then take the results of the dataset then populate the UD table. You can schedule a “Export” of the BAQ to schedule this to whatever frequency you like.

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [September 20, 2021, 8:13pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/3 "2021-09-20T20:13:49Z")

</div>

If it’s a one time thing, then maybe exporting the BAQ results, then using DMT to import them. If you don’t have DMT, you could use Copy and Paste Insert.

If you need to do it regularly, then invest the time to do it like @cfinley suggested.

---

<div class="post-metadata">

**Author:** ![Will79](https://www.epiusers.help/letter_avatar_proxy/v4/letter/w/ea666f/32.png) [@Will79](https://www.epiusers.help/u/Will79)\
**Post date:** [September 20, 2021, 8:15pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/4 "2021-09-20T20:15:13Z")

</div>

It would be daily. Thanks @cfinley!

---

<div class="post-metadata">

**Author:** ![cfinley](https://www.epiusers.help/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@cfinley](https://www.epiusers.help/u/cfinley)\
**Post date:** [September 20, 2021, 9:11pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/5 "2021-09-20T21:11:03Z")

</div>

Let me know if you run into any trouble making it

---

<div class="post-metadata">

**Author:** ![Will79](https://www.epiusers.help/letter_avatar_proxy/v4/letter/w/ea666f/32.png) [@Will79](https://www.epiusers.help/u/Will79)\
**Post date:** [September 21, 2021, 12:49pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/6 "2021-09-21T12:49:08Z")

</div>

I will be working on this through the week. I will! Thank you!

---

<div class="post-metadata">

**Author:** ![datadaddy](https://www.epiusers.help/user_avatar/www.epiusers.help/datadaddy/32/55900_2.png) [@datadaddy](https://www.epiusers.help/u/datadaddy)\
**Post date:** [March 27, 2024, 1:51pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/7 "2024-03-27T13:51:20Z")

</div>

> [@cfinley](#):
>
> then take the results of the dataset then populate the UD table.

Attempting this…

what method to “then take the result of the dataset then populate the UD Table”

I have tried “Fill Table by Query” and “Update Table by Query”, neither seem to work

Do I need to use custom code widget ?

here is how I set it up:

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

the query

 ![image](https://www.epiusers.help/uploads/default/original/3X/7/7/77befa52e1244e0b683370a9935b7966394f46c0.png)

the mapping

 ![image](https://www.epiusers.help/uploads/default/original/3X/a/a/aab5d3fed40684edfc9e3cc18511cd192defa044.png)

Thanks

---

<div class="post-metadata">

**Author:** ![NateS](https://www.epiusers.help/user_avatar/www.epiusers.help/nates/32/18519_2.png) [@NateS](https://www.epiusers.help/u/NateS)\
**Post date:** [March 27, 2024, 2:25pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/8 "2024-03-27T14:25:05Z")

</div>

You are almost there! Just add in the .Update widget for the UD table you are workign on. Put it after the update table by query. You may also need a GetDatasetForTree to create the dataset ahead of the update table by query.

---

<div class="post-metadata">

**Author:** ![datadaddy](https://www.epiusers.help/user_avatar/www.epiusers.help/datadaddy/32/55900_2.png) [@datadaddy](https://www.epiusers.help/u/datadaddy)\
**Post date:** [March 27, 2024, 2:29pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/9 "2024-03-27T14:29:33Z")

</div>

> [@NateS](#):
>
> Just add in the .Update widget for the UD table you are workign on

Thanks for reply, confused, as I don’t see an “Update” widget, can you clarify ?

btw I did get it to work with this custom code, but still would like to understand the non code approach

![image](https://www.epiusers.help/uploads/default/original/3X/8/1/8196423527fb6d3296e40def0e2cbd7e2df09151.png)

---

<div class="post-metadata">

**Author:** ![datadaddy](https://www.epiusers.help/user_avatar/www.epiusers.help/datadaddy/32/55900_2.png) [@datadaddy](https://www.epiusers.help/u/datadaddy)\
**Post date:** [March 27, 2024, 2:32pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/10 "2024-03-27T14:32:14Z")

</div>

Ahhh, I think you mean use the “Invoke BO method” widget and have it call UD21.Update ? I’ll give it a try

---

<div class="post-metadata">

**Author:** ![datadaddy](https://www.epiusers.help/user_avatar/www.epiusers.help/datadaddy/32/55900_2.png) [@datadaddy](https://www.epiusers.help/u/datadaddy)\
**Post date:** [March 27, 2024, 2:41pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/11 "2024-03-27T14:41:04Z")

</div>

Nope

---

<div class="post-metadata">

**Author:** ![NateS](https://www.epiusers.help/user_avatar/www.epiusers.help/nates/32/18519_2.png) [@NateS](https://www.epiusers.help/u/NateS)\
**Post date:** [March 27, 2024, 3:28pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/12 "2024-03-27T15:28:19Z")

</div>

In the BPM, add an “Invoke BO Method Widget”:  
 ![Capture389891991](https://www.epiusers.help/uploads/default/original/3X/a/e/ae96c6902e8778b6d1a8447189115b96beb6b5f4.jpeg)  
For the “specified” BO, choose SystemCode: ICE, Type: Business Object, ServiceName: UD21. Click Search and use the Update method. This method requires a tableset parameter. You create that first before you Update Table by Query. Copy your Update widget and change the BO method to Ice.UD21.GetByID. Assign the results of this to a tableset variable, then refer to the same variable in the update widget.

---

<div class="post-metadata">

**Author:** ![datadaddy](https://www.epiusers.help/user_avatar/www.epiusers.help/datadaddy/32/55900_2.png) [@datadaddy](https://www.epiusers.help/u/datadaddy)\
**Post date:** [March 28, 2024, 1:07pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/13 "2024-03-28T13:07:41Z")

</div>

would you be able to share the whole workflow from the designer, something is not making sense to me, thanks

---

<div class="post-metadata">

**Author:** ![NateS](https://www.epiusers.help/user_avatar/www.epiusers.help/nates/32/18519_2.png) [@NateS](https://www.epiusers.help/u/NateS)\
**Post date:** [March 28, 2024, 4:26pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/14 "2024-03-28T16:26:21Z")

</div>

![Capture2346171433](https://www.epiusers.help/uploads/default/original/3X/8/e/8e8d84640392796e920cc4a16fa703bef0f146d3.jpeg)  
Sorry, I am not at my desk today. I hope this helps!

---

<div class="post-metadata">

**Author:** ![TOsen](https://www.epiusers.help/user_avatar/www.epiusers.help/tosen/32/17758_2.png) [@TOsen](https://www.epiusers.help/u/TOsen)\
**Post date:** [March 28, 2024, 4:44pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/15 "2024-03-28T16:44:39Z")

</div>

Set the RowMod to “A” for adding new records. “U” for updating.

---

<div class="post-metadata">

**Author:** ![datadaddy](https://www.epiusers.help/user_avatar/www.epiusers.help/datadaddy/32/55900_2.png) [@datadaddy](https://www.epiusers.help/u/datadaddy)\
**Post date:** [March 28, 2024, 5:01pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/16 "2024-03-28T17:01:56Z")

</div>

I’m not seeing where to set the row mod in any of those 3 widgets.

I did setup my bpm same as shown in @NateS screen shot,  
when I execute my query, I get a single record (the first one) put in the table

thx, Scott

---

<div class="post-metadata">

**Author:** ![NateS](https://www.epiusers.help/user_avatar/www.epiusers.help/nates/32/18519_2.png) [@NateS](https://www.epiusers.help/u/NateS)\
**Post date:** [March 28, 2024, 7:02pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/17 "2024-03-28T19:02:55Z")

</div>

Set RowMod = “U” or “A” as needed in the update table by query widget.

---

<div class="post-metadata">

**Author:** ![Will79](https://www.epiusers.help/letter_avatar_proxy/v4/letter/w/ea666f/32.png) [@Will79](https://www.epiusers.help/u/Will79)\
**Post date:** [March 28, 2024, 7:08pm UTC](https://www.epiusers.help/t/from-baq-to-ud-table/82757/18 "2024-03-28T19:08:13Z")

</div>

Here’s one of the ones I did.

 ![image](https://www.epiusers.help/uploads/default/original/3X/0/c/0c4f817476fbb7e3c3573d4d0832e5265603034e.png)  
 ![image](https://www.epiusers.help/uploads/default/original/3X/9/1/91b4f36ae266335851242526a3bdbfc9e3dff6bf.png)  
 ![image](https://www.epiusers.help/uploads/default/original/3X/7/b/7b05a573ef5d240cb941b5da9398b2cc9cfdaedb.png)  
 ![image](https://www.epiusers.help/uploads/default/original/3X/a/2/a2423cd3e4a1f7d05416686bbc4e3aa0535640c3.png)  
 ![image](https://www.epiusers.help/uploads/default/original/3X/3/d/3dfc03e7807ecdd70ac8f7e7777f473207f1d8e1.png)
