Filtering Dataview

This is in Kinetic.
So I have a grid that is based off of a custom BAQ Dataview.
What I want is to have a couple buttons to update the filter on the dataview or the Where expression on the grid’s provider module.

To be more specific, in Quote Entry. I made a Dataview that gathers every customer memo.
I have a button that launches a slider with a grid in it (pretty much what the memo slider looks like). And since the grid is linked to the dataview it shows every customer memo ever, and I want to filter that down to only show the memos assigned to the Ship To Customer that’s attached to the quote. QuoteHed.CustomerCustID
And I have a second button that would do the same thing, but for the Bill To Customer attached to the quote. QuoteHed.ShipToCustID

I can tether the dataview to just the QuoteHed.CustomerCustID in the dataview, however that only gives me the one customer’s Memo

Same with setting the Where field in the grid’s provider module. I can’t find a way to update that field with an onclick event.

I also have a column in my grid that ‘Is Link’ and an event that triggers off of that link getting clicked. How do I have that triggered event set the epbinding CustomerMemo.Customer_CustID to display the data of the row that was just clicked on.

(I can only attach one screenshot per post?)

image

Can’t help ya, but I’ll give ya a free bump. And welcome to the forum!

you're welcome love GIF

Hi Tyee… I’m a tad lost on where you’re breaking down. Is the below working?

image

If not try putting single quotes. CustID is a string, so I think needs single quotes:

Customer_CustID=‘??{QuoteHed.CustomerCustID}’

1 Like

So that works, however I want to change condition based on what button I press.
So if I want the Bill To customer, I’ll use

Customer_CustID=??{QuoteHed.CustomerCustID}

However if I want the ShipTo customer, I want to change the where field to

Customer_CustID=??{QuoteHed.ShipToCustID}

I did find this function though which does what I want, but I can’t get it to do it right after launching a Slide UI for some reason.

So if you define your provider model with a name in the ep binding.

You can update the provider model parameters with the erp-baq function.

But again, I can’t get this erp-baq tool to work after I launch a slide out UI. I don’t think the grid that I have in the slide-out has finished loading its data or something.
image

I am also guessing there’s a where property in the provider model object that I could change with property-set. But I have no idea how these objects are structured and how to reference/update those variables.

This may be completely off-base… but each button is going to require an event to say what each button does, right? Could your events contain a row update that sets the value of the same column. For example, a TransView column, let’s say TransView.CustMemo

So, your ShipTo button event will take the ShipToCustID value and row-update that value into the TransView.CustMemo column.

Your SoldTo Button would take the CustomerCustID value and row-update that value into the TransView.CustMemo column.

etc.

Your BAQ grid Where clause would then be:
Where: Customer_CustID=??{TransView.CustMemo}

So, depending on the button you click, it overwrites the TransView value, and that value then filters your grid.

If that works, you may need a grid-refresh (on success) of the row updates?

3 Likes

I’m not going to lie, I have no idea what transview is or how it works lol.

TransView is just a run-time dataview. You can create any BS column you want and map to it. It won’t “save” anything, it just holds temp data so you can move it around during your events.

1 Like

It’s kind of a temp table … Trans as in Transitory - and it’s just like any other data view you have access to. You can add to it and read from it.

To add a variable to it, just set the value you want.

From @dcamlin’s example, use row-update to set TransView.CustMemo to the CustID that you want to use, then it will be available to be read from

1 Like