Number / Counter to String

Hi,
I have integer value form counter like:
var Number counter_1

In rule counter increases as counter_1=counter_1 +1

How can I transform current counter_1 value to string?

Hi , Did you manage to get this conversion ?

This can be done by the rule e.g.
postUpdate(String_Item_Name, Number_Item.state.toString)

Thank you , got it working based on your reply and on another topic as well.
Final result came as :


rule "Update Temp"
when
Item AC_Comand received update
then
postUpdate(AC_Comand_Conv, AC_Comand.state.toString)
end


Then because I had to use this string in a command I used like below , but “Item” name had to be converted to a string , thru a variable, like below ::


rule "SEND_AC_TEMP"
when
Item AC_Comand received update
then
var String AC_CTRL_CONV = AC_CTRL.name.toString
sendCommand(AC_CTRL_CONV, AC_Comand.state.toString)
end


Hope will help others.:slight_smile: