Concatenate values in a string and display on dashboard


I would like to concatenate two values that I’m receiving from my device, and then display it on dashboard as a string.

What is the best method to do it?


Hi @Kelvin_Andrade,

You can easily concatenate the two values in certain dashboard blocks. Here, I have done so with two values, which are 1 and 2. If I put them next to each other in an Indicator Block, they will concatenate to “12”:

If your block does not allow for concatenation, let me know and I will make another suggestion!


1 Like

Hey, thanks! It worked!

Now I have two more questions hehehe

  • Can I use the “Condition” to compare the “value-0” with a string? Like if {{value-0}} == “Test” change color to green
  • And if I want to make a more complex mathematical operation and then show the value in my dashboard. How could I do it?

Thanks for your help!

1 Like

Hi @Kelvin_Andrade,

Yes, you can do both of those things! The condition could be set up like so, and will change colors based on if {{value-0}} equals 1:

For mathematical operations, you have access to Handlebars, but more specifically, you have access to Format Helpers which can help you do more inline operations:

Let me know if this works for you!

1 Like

Sounds great Julia, it worked, thanks!

I read the Format Helpers, and saw something about arrays… It is possible to publish arrays to Losant?

And I have another question :smiley:
I would like to create an interactive dashboard in two ways:

  1. Create an unique Time Series Graph with a field where I select which variable I’ll show.
  2. Create a device selection in my dashboard. I have a lot of devices that are equal, so it would be nice if I could just select which one I want to check the values.

It is possible to all of these be done?

Thanks for all your support!