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}’).
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.
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.
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.
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!
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.
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?