Hi,
I am trying to change my item specifics value field from String to Integer. Is it possible?
Thanks.
Nope sorry, all specific values are just stored as text. You may be able to handle them as integers on the front-end with B@SE, depending on what you are trying to achieve. Do you just want to force users to enter integers in the control panel, or are you doing something tricky in the website templates?
I am trying to compare specific value with numbers in website theme.
That should work. B@SE has very flexible typing, and will usually coerce a string into an integer in the right context. For example, the [%if%] tag has different comparison operators for strings and ints:
https://developers.neto.com.au/documentation/neto-designer-documentation/b-se-tag-library/function-tags/logic-and-calculation/if/
I've done a quick test and integer comparisons are working for me.
The logic in your conditions is incorrect. [@name@] will never be 0 and greater than zero for example. I'm not sure what you are trying to achieve there, since that code is trying to create ranges of some sort. I don't think the problem is with your int/string comparisons.
Thank you for your help Erik. I'll have a look on that