Try our conversational search powered by Generative AI!

Possible to filter by "calculated" number fields


I'm analyzing building a "advanced search" panel where a user can add two integer input values to filter the search.

I will be able to put most calculations stuff I need as properties on the objects but I also wonder (to know what options I have) if it's possible do something like this (or similiar) when querying:

.Filter(x => (x.operatingCost + (12 * input1)).GreaterThan(x));

.Filter(x => (x.price - input2).GreaterThan(y);

Sep 19, 2013 13:53

Hi Johan,

That's not possible. However, it seems that you could get the same result by modifying what you filter with, ie: .Filter(x => x.price.GreaterThan(y+input2);

Sep 23, 2013 14:59

Thanks Joel! Examples were highly simplified. I just wanted to know if I'd missed someting when testing stuff out.

Sep 30, 2013 9:59
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.