Hi,
I’m trying to find out how or if it is possible to do a find in servoy where
one field is less then or equal to an other field on the same form.
I searched this forum on find and search, but could not find anything.
Hi,
I’m trying to find out how or if it is possible to do a find in servoy where
one field is less then or equal to an other field on the same form.
I searched this forum on find and search, but could not find anything.
The docs? Explains extensively how to use it…
Hmm. If I read carefully you want to find records where fieldA > fieldB for example? As far as I see, that is not possible using controller.find().
You can use SQL for that. In your case this could look like this:
var vQuery = 'SELECT table.pk FROM table WHERE table.fieldA > table.fieldB ORDER BY table.pk';
controller.loadRecords(vQuery);
Does this help?
This looks good, but now I need to store my computed fields. Wich I hoped I could Avoid.
If you want to search on calculated fields you need to store them anyway.
Searches are fired to the backend database and that database has no clue about Servoy calculations. Unless you store the results.
Same goes for sorting.
Thanks a lot, great help, I lost sight of that.
So for me this problem is completely solved.