Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a property alias rentalCost which has a data type of Umbraco.Decimal and want to select all Items that are not null or greater than 0
Umbraco.Content(startNodeId).Children.Where("rentalCost > 0")
I can do this with Umbraco.Integer but not with Umbraco.Decimal
Any ideas on how to do this with Decimal?
Hi Scott,
Just curious which data type did you use for the decimal integer on your document types.
/Dennis
Hi Dennis
I just realised I had Digital instead of Decimal....
I am using Umbraco.Decimal as the data type...
I can use the query shown above for Integers but want an equivalent for Decimal
I am on Umbraco version 7.4.1 assembly: 1.0.5891.23238
Okay then you can do something like this.
Umbraco.Content(startNodeId).Children.Where("rentalCost.ToString() != @0","0")
Hope this helps,
That works!
Can you tell me why Integer works with greater than and Decimal doesn't?
I was looking at updating this to do a range search going forward any advice on how to go about this?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Querying Decimal field with greater than 0
I have a property alias rentalCost which has a data type of Umbraco.Decimal and want to select all Items that are not null or greater than 0
I can do this with Umbraco.Integer but not with Umbraco.Decimal
Any ideas on how to do this with Decimal?
Hi Scott,
Just curious which data type did you use for the decimal integer on your document types.
/Dennis
Hi Dennis
I just realised I had Digital instead of Decimal....
I am using Umbraco.Decimal as the data type...
I can use the query shown above for Integers but want an equivalent for Decimal
I am on Umbraco version 7.4.1 assembly: 1.0.5891.23238
Hi Scott,
Okay then you can do something like this.
Hope this helps,
/Dennis
Hi Dennis
That works!
Can you tell me why Integer works with greater than and Decimal doesn't?
I was looking at updating this to do a range search going forward any advice on how to go about this?
is working on a reply...