Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Possible to filter by "calculated" number fields

Vote:
 

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);

#75185
Sep 19, 2013 13:53
Vote:
 

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);

#75245
Sep 23, 2013 14:59
Vote:
 

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

#75558
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.