I'm trying to populate a combobox with values from 1 table, filtered on the condition that they are present in a different table
this is a simplified view of my database: https://i.imgur.com/9MlYefY.png
I am trying to display the name field of the addresses table, but only for the ones which codes are present in one of those 3 columns in the planning table
I have tried using this filter:
Filter('[dbo].[BIT_Addresses]',code in(('[dbo].[BIT_Planning]').'Load./disch.') Or code in('[dbo].[BIT_Planning]'.To) Or code in('[dbo].[BIT_Planning]'.From)).name
but that is not giving me all of the names
I've also tried using a flow which executes an SQL query, but I can also not get that result to show in a dropdown menu, this is an example of the json the query returns: https://pastebin.com/UiJbQk53
any advice on how I can get the filter to work or how to get the SQL results to show up in my combo box would be greatly appreciated 🙂
Hi @Anonymous ,
Could you please share a bit more about your issue?
Do you mean that you could not get all available values within the ComboBox?
Based on the formula that you provided, I could not find any syntax error with it. Please modify your formula as below:
code in '[dbo].[BIT_Planning]'.'Load./disch.' || code in '[dbo].[BIT_Planning]'.To || code in '[dbo].[BIT_Planning]'.From
then check if the issue is solved.
In addition, please also take a try to save your two SQL Tables records into two separated collections, then use the Collections as data source within your app instead of Original SQL Tables. Please take a try with the following workaround:
Set the OnStart property of the App control or set the OnVisible property of the first screen of your app to following:
ClearCollect( PlanningCollection, '[dbo].[BIT_Planning]' ); ClearCollect(
Then modify your formula as below:
Filter( AddressCollection, code in PlanningCollection.'Load./disch.' || code in PlanningCollection.To || code in PlanningCollection.From ).name
please take a try with above formula, then check if the issue is solved.
it was indeed not showing all available values in the combobox, it only showed 4 but there should've been 38 options. Even weirder, when I change isSearchable to true, it's not showing anything.
I tried both your suggestions, unfortunately, they both did not work. The first filter had the same result with only showing 4 results, and the second suggestion showed none.
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.