# Is there a way to set your popup tittle base on a variable?

**URL:** <https://forum.universal-robots.com/t/is-there-a-way-to-set-your-popup-tittle-base-on-a-variable/25214>\
**Category:** General Application Help: How do I?\
**Created:** [November 23, 2022, 7:20am UTC](https://forum.universal-robots.com/t/is-there-a-way-to-set-your-popup-tittle-base-on-a-variable/25214 "2022-11-23T07:20:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jairmanquero](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jairmanquero](https://forum.universal-robots.com/u/jairmanquero)\
**Post date:** [November 23, 2022, 7:20am UTC](https://forum.universal-robots.com/t/is-there-a-way-to-set-your-popup-tittle-base-on-a-variable/25214/1 "2022-11-23T07:20:43Z")

</div>

Hi guys,

I’m new in the universal robot space and I’m trying to get familiar with the software.

I’m currently writing a script using the following function **popup(s, title=“Popup”, blocking=False)**

Currently I have a variable named **Total** that stores a value of **2.5**.

I want the tittle of my pop up to be **2.5**.

I have try the following methods, but nothing seems to work on my end.

**popup("Test, title=“total”, blocking=False)**  
**popup("Test, title=(total), blocking=False)**  
**popup("Test, title=to\_str(total), blocking=False)**

Please let me know if there is a way on achieving this or if is even possible.

Thank you.

by the way the error that i get is the following.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/f/f6fe68a03bbb4239fcd2af9c5608ffd9645721ce.png)

---

<div class="post-metadata">

**Author:** ![m.hammerton](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@m.hammerton](https://forum.universal-robots.com/u/m.hammerton)\
**Post date:** [November 23, 2022, 7:50am UTC](https://forum.universal-robots.com/t/is-there-a-way-to-set-your-popup-tittle-base-on-a-variable/25214/2 "2022-11-23T07:50:10Z")

</div>

jairmanquero,  
OK so a couple of things I would suggest from your message

You say you have a variable name Total that stores a value of 2.5  
but in your script you have **total** not **Total**. 2 different variables!  
**UR script is case sensitive so keep that in mind when using variables.**  
your also missing the closing Quotation marks after Test

Try  
popup(“Test”, title=Total, blocking=False)

---

<div class="post-metadata">

**Author:** ![MikeM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mikem/32/3114_2.png) [@MikeM](https://forum.universal-robots.com/u/MikeM)\
**Post date:** [November 23, 2022, 11:41am UTC](https://forum.universal-robots.com/t/is-there-a-way-to-set-your-popup-tittle-base-on-a-variable/25214/3 "2022-11-23T11:41:05Z")

</div>

It also looks as though you might have an extra “ ) ” in your error message shown above (right after …title=to\_str(total)’)’ \< this one here) this may might be closing the popup script command creating an error with the rest of the script written after it.

Expanding the advanced view of the script (arrow at the bottom of that error message window) may give you better details.

---

<div class="post-metadata">

**Author:** ![miwa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/miwa/32/2986_2.png) [@miwa](https://forum.universal-robots.com/u/miwa)\
**Post date:** [November 23, 2022, 1:26pm UTC](https://forum.universal-robots.com/t/is-there-a-way-to-set-your-popup-tittle-base-on-a-variable/25214/4 "2022-11-23T13:26:10Z")

</div>

Popup(“Test”, title=“to\_str(total)”, blocking=False) should do it.

Additionally, I see that you have a script file name amount which I assume is to calculate total, and then you have your popup script line.

If total is not defined as a global variable in the amount.script file, your popup script line is not going to be able to access total.

---

<div class="post-metadata">

**Author:** ![jairmanquero](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jairmanquero](https://forum.universal-robots.com/u/jairmanquero)\
**Post date:** [November 23, 2022, 5:22pm UTC](https://forum.universal-robots.com/t/is-there-a-way-to-set-your-popup-tittle-base-on-a-variable/25214/5 "2022-11-23T17:22:14Z")

</div>

thank you Hammerton,

I got to revise my spelling next time.

haha
