MODX Revo tvFilter with getResources and/or pdoResources - modx

I have a checkbox-TV:
City 1||City 2||City 3||City 4
With getResources and pdpResources tvFilter wont't work. Only if I check
only on of the "Citys". If I check 2 or more nothing worked.
&tvFilters=`art.start-city==yes%,art.city==%City 2%`
Any Ideas?

I think, that your problem is in &tvFilters value. I had similar problem and solved it by adding % to the value.
Try this:
&tvFilters=`art.start-city==%yes%,art.city==%City 2%`

Related

check column for entry and then check what is next to each of those - Make a count of those

--Edit - Solved by use of COUNTIFs --
So I am trying to see if something is possible with the below section.
I want to count how many rows are "Used&Finance" and how many are "New&Finance" etc. I cannot work out how I would do so... I hope you can help.
--edit added example data--
Does the below work for you?
I9: =COUNTIFS($H$2:$H$7,LEFT(H9,SEARCH(" ",H9)-1),$I$2:$I$7,MID(H9,SEARCH(" ",H9)+1,LEN(H9)))
I10: =COUNTIFS($H$2:$H$7,LEFT(H10,SEARCH(" ",H10)-1),$I$2:$I$7,MID(H10,SEARCH(" ",H10)+1,LEN(H10)))

Sharding Shpere setActualDataNodes {0000..1023}

I am new to Shardingjdbc. My actual tables are user_0000, user_0001..user_1024. So I use the following pattern.
result.setActualDataNodes("ds0.user_${0000..1023}");
but I always get user_0, user_1, user_2 ..user_1024
Could anyone help to solve this? I also try to use
result.setActualDataNodes("ds0.user_${\"0000\"..\"1023\"}");
It doesn't work.
I solved this problem.
maybe you can try this:
result.setActualDataNodes("ds0.user_000${0..9},ds0.user_00${10..99},ds0.user_0${100..999},ds0.user_${1000..1023}"};

Embedded IF AND Statements in Excel

I searched around on this site and found something similar to what I need, but I haven't been able to get it to work for me yet. I was able to get it to work when I do only half of it, but when I try to work in the other 2 conditions with AND statements, it gets messed up and I can't figure out what's going wrong.
The partial string of code that worked for me is this
=IF(M7>O7, IF(P7="R", 3, IF(P7="O", 2, IF)))
I have statements that would give different output...
If m7>o7 and p7="R" output a value of 3
If m7>o7 and p7="O" output a value of 2
If o7>m7 and p7="O" output a value of 1
If o7>m7 and p7="R" output a value of 0
Thanks in advance!
=IF(M7>O7,IF(P7="R",3,2),IF(P7="R",0,1))
Per the comment:
=IF(AND(M7<>"",O7<>"",P7<>""),IF(M7>O7,IF(P7="R",3,2),IF(P7="R",0,1)),"")

modx Decrement a TV to obtain 0

I need my [[+idx]] tv to start at 0 instead of 1 so I tried this:
[[+idx:decr]] or [[+idx:substract=1]] but it gives me -1 (minus one).
Does anyone know another way to obtain 0?
Thank you
Using this in chunk for getImageList works (at least for me):
[[+idx:decr]]
It gives: 0,1,2,3 ....
P.S. using modx revo 2.3.1
set your template variable default to 0 when you create the variable.
What are you trying to do, your question is vague at best.
UPDATE
ok - what I think will work for you is to write a snippet to do the math... where ever you call the [[+idx]] instead write a snippet
[[!FixIDX? &itemindex=`[[+idx]]`]]
then in your FixIDX snippet just do the math with php and return the corrected index. Though perhaps a custom output modifier would be the better way to go: http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters+(Output+Modifiers)
Though looking at the docs, your code should certainly work - I see no reason for it not to.

How to repair this issue when i click on result link in modx ajaxSearch?

I used ajaxSearch on this site: http://www.rhemapress.pl/www_poradnia/ and when I type something, e.g: czwarta or wspomaganie then when i clicked on one of return links then it redirect me to this document but on end of this link is something like this:
&searched=wspomaganie&advsearch=oneword&highlight=ajaxSearch_highlight+ajaxSearch_highlight1 and i've got this error after I clicked.
MODx encountered the following error while attempting to parse the requested resource:
htmlentities() [function.htmlentities]: charset `ISO-8859-2' not supported, assuming iso-8859-1
/home/users/rhemapress/public_html/rhemapress/www_poradnia/manager/includes/document.parser.class.inc.php(790) : eval()'d code
Where is the problem? How can i do this correctly? Database is UTF8.
I think you need to replace the character set similar to how they do it here:
http://forums.modx.com/index.php?topic=17161.0
Find instances similar to this, specifically the "etomite_charset":
htmlentities($output,ENT_QUOTES,$modx->config['etomite_charset']);
Replace with something similar to this:
htmlentities($output, ENT_QUOTES);
However I don't know all the instance of where this would appear in the ajax search plugin.

Resources