Multiple parameters by URL not working

Hello,

I have issues when i try to pass multiple parameters via URL to fetch results i need.

Like:

index.php?option=com_fabrik&view=visualization&id=1&Itemid=117&resetfilters=1&pmuj_recursosmujeres___tema=Empleo&pmuj_recursosmujeres___tema=Salud y Bienestar&pmuj_recursosmujeres___municipio=Pinto

This only works with the last paramether (in this case &pmuj_recursosmujeres___tema=Salud y Bienestar&). Including a pmuj_recursosmujeres___tema[join]=OR without result.

So, how can i fix this?

Thanks!

P.D: In My Sytes is the site to test with this URL params.
 
Hi troaster,

Not working with %20 (as spaces).

In firefox this characters are replaced, in chrome and ie in url keep the %20, i tried also with + simbol (like Salud+y+Bienestar) and no result too.

If you check, and put in last param Salud%20y%20Bienestar is geting results,but previus params not, only take the last param :(
 
Including a pmuj_recursosmujeres___tema[join]=OR
you were on the right lines here, however, as you want to filter with the 'tema' on two values you need to pass them as an array in the querystring:

index.php?option=com_fabrik&view=visualization&id=1&Itemid=117&resetfilters=1&pmuj_recursosmujeres___tema[value][]=Empleo&pmuj_recursosmujeres___tema[value][]=Salud%20y%20Bienestar&pmuj_recursosmujeres___tema[join]=OR&pmuj_recursosmujeres___municipio=Pinto&fabrikdebug=1

This wiki page has further examples of querystring filters:
http://fabrikar.com/forums/index.php?wiki/filtering-lists-tables/
 
Hi Rob,

Yes, but with the &pmuj_recursosmujeres___tema[join]=OR is NOT working.

For example, let?s made with one parameter, searching by "tema" empleo, like:

index.php?option=com_fabrik&view=visualization&id=1&Itemid=117&resetfilters=1&pmuj_recursosmujeres___tema[value][]=Empleo&pmuj_recursosmujeres___municipio=Pinto

This gives two results, thats correct.

The another param "tema" named Salud%20y%Bienestar, so:

index.php?option=com_fabrik&view=visualization&id=1&Itemid=117&resetfilters=1&pmuj_recursosmujeres___tema[value][]=Salud+y+Bienestar&pmuj_recursosmujeres___municipio=Pinto

This give me one result, that?s okay, so with this two values, result = 3.

So, trying to fetch both values like you suggest:

index.php?option=com_fabrik&view=visualization&id=1&Itemid=117&resetfilters=1&pmuj_recursosmujeres___tema[value][]=Empleo&pmuj_recursosmujeres___tema[value][]=Salud%20y%20Bienestar&pmuj_recursosmujeres___tema[join]=OR&pmuj_recursosmujeres___municipio=Pinto

This SHOULD show only 3 results, and i am getting hundreds results (maybe "tema" is getting multiple but not working then with the "municipio" -town ) ...BUT

At this way (with [value] instead [value][]) like:

index.php?option=com_fabrik&view=visualization&id=1&Itemid=117&resetfilters=1&pmuj_recursosmujeres___tema[value]=Empleo&pmuj_recursosmujeres___tema[value]=Salud y Bienestar&pmuj_recursosmujeres___tema[join]=OR&pmuj_recursosmujeres___municipio=Pinto

I am getting only last "tema" param &pmuj_recursosmujeres___tema[value]=Salud y Bienestar.


Thanks for help!
 
Hello,

After multiple testing i can confim multiple terms are working....important:
[value][] and the &pmuj_recursosmujeres___tema[join]=OR

By the way, the last param
&pmuj_recursosmujeres___municipio

This defines the town and not working, allways get results from all towns (the same that omiting parameter).

So, like:

index.php?option=com_fabrik&view=visualization&id=1&Itemid=117&resetfilters=1&pmuj_recursosmujeres___tema[value][]=Empleo&pmuj_recursosmujeres___tema[value][]=Salud y Bienestar&&pmuj_recursosmujeres___tema[value][]=Vivienda&pmuj_recursosmujeres___tema[join]=OR&pmuj_recursosmujeres___municipio=Pinto

Is getting this param right pmuj_recursosmujeres___tema, but pmuj_recursosmujeres___municipio not working.

In the table/list also the same issue (tema - multiple params works, but not working with different params)

Update again: with only two different params it seems work normally, like:

index.php?option=com_fabrik&view=list&listid=10&Itemid=111&resetfilters=1&pmuj_recursosmujeres___tema[value][]=Empleo&pmuj_recursosmujeres___municipio=Pinto

Thanks!
 
Hi Rob! Thank you so much, after many test really is working by every "tema" with the [grouped_to_previous]=1. That is the secret! :)

But not all happy, if i try to search also by multiple "municipio" (town) not works...so url i?m building for multiple "tema" and "municipio" like:


/index.php?option=com_fabrik&view=visualization&id=1&Itemid=117&resetfilters=1&pmuj_recursosmujeres___tema[value][]=Empleo&pmuj_recursosmujeres___tema[value][]=Salud%20y%20Bienestar&pmuj_recursosmujeres___tema[join]=OR&pmuj_recursosmujeres___municipio[value][]=Pinto&pmuj_recursosmujeres___municipio[value][]=Alcal%C3%A1%20de%20Henares&pmuj_recursosmujeres___municipio[join]=OR&pmuj_recursosmujeres___tema[grouped_to_previous]=1&pmuj_recursosmujeres___municipio[grouped_to_previous]=1

I am building a [join]=OR (for both) and a [grouped_to_previous]=1 for both, so how can do this??

Thank you so much.
 
Wow Rob! It seems works! The url is really really long (and you can imagine if many towns / topics at the same time) but it seems working and this is amazing, we take a long time trying combinations with no results.

So as usual thank you for your support and you help!
 
Wow, that's funky. So basically, you have to match the array of 'join' and 'grouped_to_previous' to the array of values. So, if there were 5 'tema' values in that query, there would be 5 each of the join and grouped_to_previous, with all but the last of the grouped_to_previous being 0.

That's kind of the track I was on last night, but I can see why I wasn't able to quite get it working.

Thanks rob

-- hugh
 
Hello again,
Wow, this is not crazy but i maybe i am building wrong the URL. It?s working with 2 or less but I?m trying to set for example 3 "tema" and 3 "municipio" like:

index.php?option=com_fabrik&view=visualization&id=1&Itemid=117&resetfilters=1
&pmuj_recursosmujeres___tema[value][]=Empleo
&pmuj_recursosmujeres___tema[value][]=Salud y Bienestar
&pmuj_recursosmujeres___tema[value][]=Vivienda
&pmuj_recursosmujeres___tema[join][]=AND
&pmuj_recursosmujeres___tema[join][]=OR
&pmuj_recursosmujeres___tema[grouped_to_previous][]=0
&pmuj_recursosmujeres___tema[grouped_to_previous][]=1
&pmuj_recursosmujeres___municipio[value][]=Pinto
&pmuj_recursosmujeres___municipio[value][]=Madrid
&pmuj_recursosmujeres___municipio[value][]=Ajalvir
&pmuj_recursosmujeres___municipio[join][]=AND
&pmuj_recursosmujeres___municipio[join][]=OR
&pmuj_recursosmujeres___municipio[grouped_to_previous]=0

This gives me an error:

getData:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ......

So, i?m right with this? Or how should i build url with 3 and more terms?

Thank you so much!
 
Oh....bad news....it seems that "tema" is not working as desired...for example like here (in list):

index.php?option=com_fabrik&view=list&listid=10&Itemid=111&resetfilters=1&pmuj_recursosmujeres___tema[value][]=Empleo&pmuj_recursosmujeres___tema[value][]=Salud y Bienestar&pmuj_recursosmujeres___tema[join][]=AND&pmuj_recursosmujeres___tema[join][]=OR&pmuj_recursosmujeres___tema[grouped_to_previous][]=0&pmuj_recursosmujeres___tema[grouped_to_previous][]=1&pmuj_recursosmujeres___municipio[value][]=Pinto&pmuj_recursosmujeres___municipio[value][]=Alcal? de Henares&pmuj_recursosmujeres___municipio[join][]=AND&pmuj_recursosmujeres___municipio[join][]=OR&pmuj_recursosmujeres___municipio[grouped_to_previous]=0


In visualization the same....

index.php?option=com_fabrik&view=visualization&id=1&Itemid=117&resetfilters=1&pmuj_recursosmujeres___tema[value][]=Empleo&pmuj_recursosmujeres___tema[value][]=Salud y Bienestar&pmuj_recursosmujeres___tema[join][]=AND&pmuj_recursosmujeres___tema[join][]=OR&pmuj_recursosmujeres___tema[grouped_to_previous][]=0&pmuj_recursosmujeres___tema[grouped_to_previous][]=1&pmuj_recursosmujeres___municipio[value][]=Pinto&pmuj_recursosmujeres___municipio[value][]=Alcal? de Henares&pmuj_recursosmujeres___municipio[join][]=AND&pmuj_recursosmujeres___municipio[join][]=OR&pmuj_recursosmujeres___municipio[grouped_to_previous]=0

The "temas" to search are "Empleo" and "Salud y Bienestar". But in results, there are results that NOT contains this "temas". Also in database there are values that is not showing.....the same happens with visualization...in this resources....multiple results appears without "tema" selected....so definetively searching by "tema"is NOT working as desired...:(

Thank you.
 
can you explain the logic you want to show, e.g

where (tema = 'foo' AND tema = 'bar')
 
Hi Rob,

yeah, like this:

where (tema = 'foo' OR tema = 'bar' OR tema = 'othervalue' ) AND (municipio = 'town1' OR municipio = 'town2' OR municipio = 'town3' )

Thank you!
 
this will (again sorry!) need an update from github - but the syntax is a more manageable:

index.php?option=com_fabrik&view=list&listid=10&Itemid=111&resetfilters=1&pmuj_recursosmujeres___tema[value][]=bar&pmuj_recursosmujeres___tema[value][]=foo&pmuj_recursosmujeres___tema[value][]=other&pmuj_recursosmujeres___tema[condition][]=IN&pmuj_recursosmujeres___municipio[value][]=town1&pmuj_recursosmujeres___municipio[value][]=town2&pmuj_recursosmujeres___municipio[value][]=town3&pmuj_recursosmujeres___municipio[condition][]=IN

which will give a query equivalent to what you are after:

where (tema IN ('foo', 'bar', 'othervalue')) AND municipio IN ('town1', 'town2', 'town3'))
 
Hi Rob,

Thank you for your efforts! :)

I tried the url with real values like:

index.php?option=com_fabrik&view=list&listid=10&Itemid=111&resetfilters=1&pmuj_recursosmujeres___tema[value][]=Empleo&pmuj_recursosmujeres___tema[value][]=Vivienda&pmuj_recursosmujeres___tema[condition][]=IN&pmuj_recursosmujeres___municipio[value][]=Madrid&pmuj_recursosmujeres___municipio[value][]=Pinto&pmuj_recursosmujeres___municipio[value][]=Ajalvir&pmuj_recursosmujeres___municipio[condition][]=IN

But this gives me a....
getData:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Vivienda' ...

So, this is related that i need github update?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top