Kinetic-Web Dashboards, Parent & Child BAQ connection

I am setting up a new application, It’s fairly straightforward, I created the initial app with the app wizard and specified a BAQ that displays a few fields from Customer, so the result is an app with one dataview I called “Customers”…

I then created another dataview using the dataview wizard, called it “CustomerOrders”,
I have another BAQ that is the source of data for the dataview and a corresponding panel-grid

I am trying (and failing) to display the orders for the selected customer from the first/parent grid
but am having trouble restricting the orders to the current customer (using CustNum)

I have tried:

  • Setting the Parent-Child relationship between the Customers and CustomerOrders views (on CustNum)
  • Setting the Where-Clause on the child grid’s Where clause to "OrderHed = “OrderHed_CustNum = ?{OFB_CustomerApp.Customer.CustNum}”
    (under “grid-model → provider-model → baq-options → where list → where clause”)

(for those of you that might have attend the Midwest Users Group Meeting in Milwaukee area last week, this was one of the demos in a technical session that covered wizards, panel-grids, and card stacks, but the connection between the parent and child grid I somehow missed)

bump

I have to assume it is the Where-Clause that is not quite fine-tuned.

@hmwillett had a post about this which may be helpful.

If you’re using a Where List, I would try:

Column: OrderHed_CustNum
Condition: =
Value: ‘??{Customers.OrderHed_CustNum}’

I did follow @hmwillett 's post that you referenced as the basis for my application,

Mine is similiar to her’s except that she was using a where clause on her first query based on the quote that was loaded for the loading of her first grid.

Where as my first grid is the basis of a new app, the first grid shows all Customers (with a certain criteria determined by the BAQ), so I shouldn’t need a where clause on the first grid

My 2nd grid attempts to link the Customers grid with a child grid showing the selected customer’s Orders.

So for that part I have a where clause (I tried the where clause outside of the list and as a single entry in the where clause list)

As for the syntax of the where clause on the child/Orders grid, I did try many combinations, no '?'s, 1 ‘?’, and '??, both with and without the ‘Honor Null’ checkbox checked.

Her tutorial is very good and makes great sense to me but somehow the where clause filter is ignored (in theory) cuz I get orders for all customers

Oh…progress…I used this for my where clause on the 2nd grid:

image

(“Customer” is the actual name of my parent dataview I created)

interestingly, the behavior I get now is it first loads just the orders from the initially selected customer
(top one in the list of the first grid)

but then after about 5 seconds, the child grid refreshes and loads orders for all customers listed

???

but yet if I select another customer from the top grid, it loads only that customers orders, and stays that way, i.e. it works fine after the first customr

what the heck ?

Picture of the result (after selecting a customer after initial load)

I think I’m going to open a ticket with Epicor at this point, seems too strange

Thanks for the tweak on the where clause @dcamlin, yours wasn’t quite correct (like mine) but it got me to look closer at it :wink:

Change it to a single ‘?’.

Being a custom app, its tough to help troubleshoot without sounding like a backseat driver. haha.

Any events tied to that Child Grid?

Speaking of which… I don’t know the impact of actually defining the dataviews as Parent/Child. Perhaps there are some baked-in events where changing one updates/impacts/refreshes the other?? Not sure.

Do you need the Parent/Child dataview relationship?

Do you need a 2nd Dataview at all? BAQ1 would load your customers… BAQ2 could just be a BAQ grid… doesn’t need its own dataview, perhaps?

Omg, that was it…

funny I had tried every combination of the ? thing but of course that was before I fixed my where clause,

then I didn’t bother to try both

Whoooo hoooo

Excited Season 6 GIF by The Office

questionmark

@dcamlin

I think you are asking good questions, I did eventually remove the parent child relationship and I also believe now I might not need the child view either,

I will try that next, but for first crack at this, I was trying lots of different things to get it to work

(I have two grandchild grids to make next) (wanna try stacked cards also)

The kind of cookbook type examples that @hmwillett provided (she’s done more than one) is what is sorely lacking in Epicor’s documentation

thanks again to you both for the help