How do I add a new line for text in the add value expression in Just In Mind?

342 views Asked by At

I am trying to make a list for example, food and their price in the value field of the rectangle using events.

Sausage $10
Hamburger $10

The expression that I have so far to create this is:

Sausage CONCAT (Space) CONCAT $10 CONCAT \n CONCAT Hamburger (SPACE) CONCAT $10

But that expression above will become this:

Sausage $10\nHamburger $10

But the \n does not work, I've tried to find methods on how to create a new line in the add value expression interface.

Please help, thank you so much

1

There are 1 answers

0
Maxim Lee On

This works for me:

  • create a text widget, set it as multi-line
  • set the text to '\n' (i.e. delete the text and hit ctrl+enter)
  • use the widget's value when calculating the expression:
    • Sausage CONCAT (Space) CONCAT $10 CONCAT multiline_widget.value CONCAT Hamburger (SPACE) CONCAT $10
    • or: Sausage CONCAT (Space) CONCAT $10 CONCAT substring (multiline_widget.value, 0, 1) CONCAT Hamburger (SPACE) CONCAT $10