Did som more checking. On my import routines I use umbracoProductNodes.Where(x => x.GetValue<string>("productItemId"))
And this gives me the correct value including the first 026601620, but still on umbracoProduct.Children(x => x.DocumentTypeAlias.Equals("ProductItem")).Select(x => x.GetPropertyValue("productItemId")) it is returned as 26601620
I also tried to use a textfield instead of label datatype, and then it works.
Now, I checked using GetProperty instead of GetPropertyValue. Reading the .GetProperty("productItemid").Value returns 26601620 while .GetProperty("productItemId").DataValue returns 026601620
Label datatype stripping leading zeros
Hi!
I have a label datatype with the value 026601620
I then try to get the value using for example: umbracoProduct.Children(x => x.DocumentTypeAlias.Equals("ProductItem")).Select(x => x.GetPropertyValue
This comes back as 26601620 (missing the leading zero). If I try it where the label is for example 826601620 it returns as it should.
Any idea why Umbraco would strip the leading zero on a label datatype?
Did som more checking. On my import routines I use
umbracoProductNodes.Where(x => x.GetValue<string>("productItemId"))
And this gives me the correct value including the first 026601620, but still on
umbracoProduct.Children(x => x.DocumentTypeAlias.Equals("ProductItem")).Select(x => x.GetPropertyValue("productItemId"))
it is returned as 26601620I also tried to use a textfield instead of label datatype, and then it works.
Now, I checked using GetProperty instead of GetPropertyValue. Reading the .GetProperty("productItemid").Value returns 26601620 while .GetProperty("productItemId").DataValue returns 026601620
Something wrong on the source?
Anyone has time to look at this, or should i submit a ticket?
It seems only for Umbraco 7 issue. I used to use GetPropertyValue("Label") in Umbraco 6.2.2 and it's working well.
GetPropertyValue("Label")
Anyone has idea about it?
I'm having this very same issue in 7.2.6. The labels DataValue is 02501 but it's Value is stripped to 2501 when running:
I have submitted a ticket. Please help vote it up. http://issues.umbraco.org/issue/U4-7929
is working on a reply...