In application studio how to create a BAQ combobox filtered by CallContextClientData?

Does anyone know in application studio how to create a combobox populated by a baq and filter it by a value in the CallContextClientData dataview like currentcompany or currentplant? I can’t seem to get it to work and the guide in the documentation is either out of date / also doesn’t work.

I tried setting the baq in advanced and using the filter’s append. I swore this worked before but it seems like something might have changed? Whats odd is if I harcode the value (PartPlant_Plant = ‘106’) it works by trying to reference the field doesn’t (PartPlant_Plant = ‘{?CurrentPlant}’).
image
image

1 Like

Hello

You can try placing the following:
PartPlant_Plant = ‘{CallContextClientData.CurrentPlant}’

As a follow up to @NewUser’s solution, the “?” does not go inside the curly brackets. It should be outside of them, but inside the single quote. '?{callContextBpmData.CurrentPlant}'

This is not one of the properties that will accept that “?” notation, however. It needs to be removed.

image

Sadly this did not work and resulted in the combobox displaying no data.
image

Oops sorry that was actually a typo. However when I try ‘?{callContextBpmData.CurrentPlant}’ I get no data.
image

Ah–you’re using a combo box.
So, there’s currently a limitation where the filter has to be within the same dataset as your binding.
For example, if you bound the field to PartPlant.Plant, then the filter needs to be within the same PartPlant view.

I don’t recall this being fixed, but I will test in the latest and see.

Oh that’s an annoying limitation. Thanks for that info. Is there any way you know of to do what I’m trying to do then? This combo box is just bound to CallContextBpmData.Character01 and I’ve got a BAQ that returns 3 fields PartPlant_Company, PartPlant_Plant, and PartPlant_PartNum. I just want to always filter the baq by the currentcompany(=PartPlant_Company) and currentplant(=PartPlant_Plant) and return the resulting PartPlant_PartNum in the dropdown.

There’s actually a reasonable solution for you, then.
Create a BAQ dataview and set the static filter to be current plant, then bind your view to your combo box.

Confirmation of the limitation:

I just gave that a shot and I’m still struggling to get it to populate. Here’s my dataview.

The documentation on dataview combos says I just need to populate ‘View Name’, ‘TextField’, and ‘ValueField’,


but I have a hunch the documentation is missing something because this doesn’t seem to return anything even when the static filter on the dataview is blank.

image

Did you create an event to fire after AfterGetByID (or whatever is appropriate to your need) to populate the BAQ?

Ah that seemed to be what was missing thanks. I had a fundamental misunderstanding. I didn’t realize you had to explicitly fill the data view, I assumed it would dynamically fill when called as the dataview already has the name of the BAQ. It seems a little odd to me that it requires you to specify the BAQ you’re using in the dataview and then you have to specify it again to populate it. Thanks for the help!

Part of the fun that is Kinetic is trying to figure out where it fills it automatically and when it doesn’t, lol.
:v:t2:

1 Like

Oh one last thing. Do you by chance know what the syntax is for using multiple criteria in the dataviews static filter? The two below didn’t seem to work.

  1. PartPlant_Company = ‘{CallContextClientData.CurrentCompany}’,PartPlant_Plant = ‘{CallContextClientData.CurrentPlant}’

  2. PartPlant_Company = ‘{CallContextClientData.CurrentCompany}’ && PartPlant_Plant = ‘{CallContextClientData.CurrentPlant}’

I believe it’s AND.

PartPlant_Company = ‘{CallContextClientData.CurrentCompany}’ AND PartPlant_Plant = ‘{CallContextClientData.CurrentPlant}’

You can do this within the BAQ itself using the constants filters, what is the reasoning for not doing the filtering within the BAQ unless I am missing something?

Thanks, this ended up being the best solution for this particular issue.

Thanks, this worked.

1 Like