# How to display a default value on a text bound to dynamic variable?

**URL:** <https://forum.luna-park.app/t/how-to-display-a-default-value-on-a-text-bound-to-dynamic-variable/34>\
**Category:** English\
**Created:** [July 9, 2024, 2:40pm UTC](https://forum.luna-park.app/t/how-to-display-a-default-value-on-a-text-bound-to-dynamic-variable/34 "2024-07-09T14:40:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hugo](https://forum.luna-park.app/user_avatar/forum.luna-park.app/hugo/32/8_2.png) [@Hugo](https://forum.luna-park.app/u/Hugo)\
**Post date:** [July 9, 2024, 2:40pm UTC](https://forum.luna-park.app/t/how-to-display-a-default-value-on-a-text-bound-to-dynamic-variable/34/1 "2024-07-09T14:40:28Z")

</div>

> I have a text bound to a dynamic variable, but I’d like to display “Hello M. Anonymous” if the variable is empty.  
> How would I do that?

There are several ways of doing this. The less practical one would be to use `If` templates.  
The smarter way is to use a computed variable.

Just create a new computed variable with the name `displayName` and this logic:

 ![image](https://forum.luna-park.app/uploads/default/original/1X/852e6ee95194fd251f270e9abec0f48a1b42896b.png)

If `name` = “Bond”, `displayName` = “Bond”  
If `name` = “”, `displayName` = “Anonymous”

So you’ll just have to use `displayName` on the text!
