You can help by commenting or suggesting your edit directly into the transcript. We'll review any changes before posting them. All comments are completely anonymous. For any comments that need a reply, consider emailing email@example.com.
We are experiencing playback issues from our video hosting provider. Please check back shortly.
2:15Property Binding – Bidirectional
Take topic challenge
Expression Binding – Concat Strings
Learn how to concatenate strings using an expression binding.
Video recorded using: Ignition 7.7
Transcript(open in window)
[00:00] We can use the expression language in addition to concatenate two strings together. So as an example, we have a Username tag under the System, Client, User folder that allows us to see who's logged in to the runtime. I can easily bring that value onto screen like I've done here. So there's a label here that's just showing the value of that tag. As of the second label here that's just basically saying Logged in:. As you can see, there are two separate labels right now. It's possible to actually do all of this in a single label by using the expression language to concatenate those two strings. I'm going to bring the Label onto the window right below that, make it a little bit larger. Go down to the Text property label, down the bottom left. I'm going to bind that to an expression. The expression, I'm going to concatenate these two strings. So what I'm going to do here is put the first string which I'm going to put in double quotes, Logged In: with a space and any string you want to put literally here in the expression language, you put double quotes around it. Then we use the plus here to concatenate that with another string. And I'm going to go and bring in the tag value, the Username tag that we have from the System folder. So I'm going to use the tag button on the right-hand side. Go down to my System, Client, User and get the Username tag. So really simple, I can combine these into one label by concatenating those two strings. Soon as I press OK, I get the same effect that I have up here except for it's just one label.