Multiple Lookup values in the same form October 25, 2019, 11:45:00 PM I assume this can be done, as the Query Params can be separated by commas, but how do you associate the Query params with the '?' in the query builder? Is it just sequential ? 1st '?' corresponds to first Parameter in the Params box below?To elaborate a bit more, what I would like to accomplish in this test is this:Tables : [Country] [Company] [Brand] [Product] and a [Order] table where the selection is madeOne Company has several brands that are present in several countries, but all products are not available in all countries, even they share the same company/brand.US - Company A - Brand 1 - Product USA1US - Company A - Brand 2 - Product USA2UK - Company A - Brand 1 - Product UKA1UK - Company A - Brand 3 - Product UKA3So, with the current lookup form, I can just select one Dynamic Select Field to define the Where clause. In this case, the ideal would be to use all 3: country, company and brand .. to display only the products that match all 3 conditions. With simple linear selections, can be done, but the problem comes when a product can be available in more than one country, but not all.. or when same brands are in different countries and have different products for each country. Quote Selected
Re: Multiple Lookup values in the same form Reply #1 – October 26, 2019, 09:15:21 AM @ewwgee yeah, it is sequential. Quote Selected Last Edit: October 26, 2019, 12:39:22 PM by willvin
Re: Multiple Lookup values in the same form Reply #2 – October 26, 2019, 10:08:44 AM Thanks.#2 about Gmail was probably for someone else.I've tried multiple combinations with Query Params in the form of $lookup_idSomethingHere and with one param they work fine, but never with 2.Just a quick example, assuming we're using the same DB and fields for this example. And 1 and 2 work fine, but 3, using the same data, doesn't.Query box:"SELECT DISTINCT id AS value,name AS label FROM brand WHERE idSomethingOne= ? " Params box:$lookup_idSomethingOneThis works Query box:"SELECT DISTINCT id AS value,name AS label FROM brand WHERE idSomethingTwo= ? " Params box:$lookup_idSomethingTwoThis worksQuery box:"SELECT DISTINCT id AS value,name AS label FROM brand WHERE idSomethingOne= ? AND idSomethingTwo= ?" Params box:$lookup_idSomethingOne, $lookup_idSomethingTwoThis does not work Quote Selected
Re: Multiple Lookup values in the same form Reply #3 – October 26, 2019, 07:01:04 PM I have tested with multiple parameters, and it works sequentially when they are values, but for some reason the lookups don't work when having more than one in the parameter box. Quote Selected
Re: Multiple Lookup values in the same form Reply #4 – October 28, 2019, 01:55:28 PM @ewwgee your issue is similar to this thread 👉https://phprad.com/forum/index.php?topic=483.msg1486#msg1486, please resolve using the solution given here to try and solve yours. Quote Selected
Re: Multiple Lookup values in the same form Reply #5 – October 28, 2019, 07:01:28 PM Related question.. where is the code that manages the $lookup_??? stored? Quote Selected
Re: Multiple Lookup values in the same form Reply #6 – October 29, 2019, 05:41:27 PM @ewwgee which $lookup_??? are you talking about? Quote Selected
Re: Multiple Lookup values in the same form Reply #7 – October 29, 2019, 10:45:25 PM Any $lookup_**** that is generated by the Field Datasource popup Quote Selected
Re: Multiple Lookup values in the same form Reply #8 – October 30, 2019, 11:24:39 AM @ewwgee check the app/controller/ for its controller code and app/view/partial/ folder for its view code, for the all static list generated, you can find its data in the Menu.php file in helper folder. Quote Selected