extraParams in livetable

Hey,

I tried to add extra constraints to a livetable with the extraParams option but it is not working like I would expect it. If I use equal sign(=) as operand, it works just fine, but any other operand like not equal(I tried !=, ~=, <>, <, >, in) is not working. Is it just possible to use equal as operand?

Also one column in my livetable is the type list. And I tried also to just get Elemnts which have a string in this list with the oprand in in extraParams and it did not work. Then I read about the method with JSON. But the issue is, the livetable is included in a page which is used as template and should display all elements, which have the parent page name in the mentioned list, so the search has to be adopted every time and I have to edit the JSON page. I thought about that I could always change the content of the file but now I have the issue with quotation marks, because the text I want to write to the file contains these " and these ’ quotation marks and I dont know how get this in one string. Can you please help me ? Thanks a lot!

The value of the extraParams option is a query string so it can only look like:

key1=value1&key2=value2&...

Now, how value1 is used on the server depends of course on the live table results pages that is being used by your live table. You didn’t mention if you use the default live table results page or not. If you’re using the default then passing key1=value1 in the extraParams option should behave the same as typing (or selecting) β€œvalue1” in the filter of the β€œkey1” live table column. Basically if behaves as if the column filter would be prefilled with some value. Thus it supports only positive match: full or partial match (depending on the live table configuration and the column type).

1 Like

If value1 is a page reference, and that page reference contains a dot (which is escaped with a backslash => β€œ\.”), this extraParams option does not select the page.
If the page reference contains an ampersand β€œ&”, I can rewrite value1 with the $escapetool.url() function which converts β€œ&” to β€œ#26”. But this is not a solution when the strings contains β€œ\.”
Suggestions?

Substitute \. with \\.
=>
#set($str1=$thisDoc.replaceAll("\\\.","\\\\\."))
#set($str2 = $escapetool.url($str1))