Hide String item if empty

I want to hide a String item if it is empty and show if it is not empty.

items:

String infoGeburtstag01                 ""

sitemap:

Text   item=infoGeburtstag01  visibility=[infoGeburtstag01!=""] 

But it is not working. The string is empty but it is still visible:

Working fine for my test setup.
Only thing i have changed is an appropriate String desciption.

String Test  "String Test Item  [%s]"
Text  item=Test  visibility=[Test!=""]
openhab> smarthome:update jsonTest ""
Update has been sent successfully.
openhab> smarthome:update jsonTest "Test"
Update has been sent successfully.

In the first case the item is hidden in my testing sitemap.
In the Second case the value Test is shown properly.
It seems that the Item Description with %s does the trick.
Without that %s part, i can reproduce your behavior.

Give it a try.

ok. I will try it later…

At the end I will see the name if someone has bithday. If not I won’t see the item…
Is this the right proceed:

ITEMS:

//Geburtstagsinformationen (max. 5)
Group aktuellGeburtstag

String infoGeburtstag01                "[%s]" (aktuellGeburtstag)
String infoGeburtstag02                "[%s]" (aktuellGeburtstag)
String infoGeburtstag03                "[%s]" (aktuellGeburtstag)
String infoGeburtstag04                "[%s]" (aktuellGeburtstag)
String infoGeburtstag05                "[%s]" (aktuellGeburtstag)

Sitemap:

...
Text   item=infoGeburtstag01  visibility=[infoGeburtstag01!=""]              
Text   item=infoGeburtstag02  visibility=[infoGeburtstag02!=""]              
Text   item=infoGeburtstag03  visibility=[infoGeburtstag03!=""]               
Text   item=infoGeburtstag04  visibility=[infoGeburtstag04!=""]
Text   item=infoGeburtstag05  visibility=[infoGeburtstag05!=""]
...

RULES:

//***********************************************
//** clear birthday items at midnight
//***********************************************
 rule "TAEGLICHE"
    when Time is midnight
 then
	//clear items
	infoGeburtstag01.postUpdate("")
	infoGeburtstag02.postUpdate("")
	infoGeburtstag03.postUpdate("")
	infoGeburtstag04.postUpdate("")
	infoGeburtstag05.postUpdate("")
end


//***********************************************
//** Birthday 
//***********************************************
rule "GCAL_GB"
when
	Item GCAL_GB changed 
then

 //set birthdayname

aktuellGeburtstag.members.forEach [ item | 
  if(item!=null){
   item.postUpdate(GCAL_GB.state.toString)
  }	
]
	
end

I am not sure if it will work or if there are any potential for improvement.