# Button template dynamic border

**URL:** <https://forum.inductiveautomation.com/t/button-template-dynamic-border/17420>\
**Category:** Ignition\
**Created:** [March 19, 2018, 7:13pm UTC](https://forum.inductiveautomation.com/t/button-template-dynamic-border/17420 "2018-03-19T19:13:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbrannen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbrannen/32/3459_2.png) [@sbrannen](https://forum.inductiveautomation.com/u/sbrannen)\
**Post date:** [March 19, 2018, 7:13pm UTC](https://forum.inductiveautomation.com/t/button-template-dynamic-border/17420/1 "2018-03-19T19:13:58Z")

</div>

Good day all…

I _think_ my issue is simple. I have a button template that I am trying to dynamically set the border property based on template custom properties, but so far it’s not working and not making much sense (to me) as to why.

The custom template properties of button named **btn\_Command** are:  
c\_BordColor (color)  
i\_BordWidth (integer)

When applying one of these expressions to the border binding:  
• This works: **`toBorder(“line; blue; 2”)`**  
• This does not: **`toBorder(“line; {btn_Command.c_BordColor}; {btn_Command.i_BordWidth}”)`**

Applying the second expression _does_ set the border to line style, but it seems to ignore the color and width arguments.

Any suggestions?

Thanks for any assistance,  
Steve

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [March 19, 2018, 9:45pm UTC](https://forum.inductiveautomation.com/t/button-template-dynamic-border/17420/2 "2018-03-19T21:45:35Z")

</div>

> [@sbrannen](#):
>
> toBorder("line; {btn\_Command.c\_BordColor}; {btn\_Command.i\_BordWidth}")

```auto
toBorder(concat("line;",{btn_Command.c_BordColor},";",{btn_Command.i_BordWidth}))

```

Because you have the bindings inside the quotes. You need to resolve the bindings and concat then pass that into toBorder

---

<div class="post-metadata">

**Author:** ![sbrannen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbrannen/32/3459_2.png) [@sbrannen](https://forum.inductiveautomation.com/u/sbrannen)\
**Post date:** [March 20, 2018, 10:34am UTC](https://forum.inductiveautomation.com/t/button-template-dynamic-border/17420/3 "2018-03-20T10:34:05Z")

</div>

Awesome. I thought it was something like that and was trying to resolve inside the quotes with toColor and toInteger. Seems perfectly clear now. Thank you!
