Inspired by this thread, I tried the idea to put this: [['product.categories_all', '=', 'my-product-category-name' ]]
into the search criteria field of a window action
It works for me, but instead of ‘my-product-category-name’, this string ‘=my-product-category-name’ (with an additional ‘=’) is put into the search line. What could be wrong in my search criteria entry - or whatever?
So I tried [['product.categories_all', 'ilike', 'my-product-category-name' ]]
in search criteria instead, because I suspect we might deal with text fields here, but get the same result:
Again, there is an “=” in front of the my-product-category-name string in the search line.
This is because without any wildcard like % or _, it is mainly equivalent to a = operator (minus the case insensitive but we do not have such operator in the search widget).
As you see - “my-search-string” has got an ‘=’ in front of it, and I could not yet find out how to get rid of it.
2nd: In “domain”, the ‘forecast quantity’ string needs to be replaced by “nothing” (“find anything without restriction”) But leaving the field empty does not work. How can I achieve “find anything”?
Right. I’m giving in here.
I tried my best, but it seems I cannot make myself understood, and I cannot understand your answers, they seem to be designed for programmers. Unluckily, I’m just an ordinary user.
Thank you, Sir, for your effort. Much appreciated anyway.
Thank you for your message.
Hm, not sure. If the search string has got the “=” at the beginning, only 3 products are shown. When I do remove the “=”, I get the complete result. So I think, in my case it matters.
I cannot find out what these 3 products have in common - but I guess the proper solution would be a search string without an “=”.
It is hard to understand your case without visual examples, but if the ‘=’ operator is giving you 3 records, it is because only this 3 records are literally equal to your search, anyways, I see you’ve tried with: [['product.categories_all', 'ilike', 'my-product-category-name']]
Even you’ve changed the ‘=’ to ‘ilike’, as Ced already said, you did not use any wildcard, so it is basically the same, you should try with something like: [['product.categories_all', 'ilike', '%my-product-category-name%']]
So it does take effect; i just did this on the demo:
btw, leaving the domain empty does actually “find anything” as long as it match the search, make sure you properly reload after modifying the action.
Let me know what do you get.
To do proper testing - how can I manually trigger the window action? - By now, I’m switching to another language, but I don’t think that delivers the results desired.
Ah, thank you. I should have known that on my own, sorry for the question.
On the main issue:
I now put [['product.categories_all', 'ilike', '%my-search-string'] into the search criteria box. But that does not make any difference:
In the window action result window, I get Artikel.Artikelkategorien: =my-search-string. So for me it appears that the “=” always is included into the search string and for that reason produces a wrong result.
NB: No dfference as well with %my-search-string or %my-search-string%.
Have you properly reloaded the client after modifying the action? i’ve never used desktop client but in the demo after modifying the search value I need to refresh or it still gets the value from before.
ps: test %my-search-string% isntead of %my-search-string as you don’t know where the problem exactly is.
I did all kinds: Relaunch client, restart server - and now carry out the window action manually. No difference. Always the “=” is included in the search string.
Then is impossible to help, I reproduced everything I said in the demo, I honestly recomend you to also try on demo as it is a clean environment then once you got the steps clear try on your server.