Partial use of data in text, how?

How do i use data from a dataset for just a part of a text. I want something like:

You are looking at information about [NAME OF CITY].

Where NAME OF CITY needs to come from a dataset. If i now connect my data to a text, the entire text is replaced, meaning i lose the “You are looking at information about” part.

How do i do the above?

is the text element hooked directly up to the database or are you getting the data with a query. if you are using a query you could append the text
$w(‘textElement’).text += (’ '+[NAME OF CITY])

Hello Sander

you can do that in different ways:

  • add two text boxes next to each other, fist one will have the “You are…” text and the second connect it to the dataset
  • you can do that using code
  • query the dataset to get the name of the city. - Query

  • get the text value from the text box → let text = $w(‘#text1’).text

  • append the queering result to it → $w(‘#text1’).text = text + resultValue

  • extra trick, you can change the style of your text to look the same of how u want using code. - here

Best
Massa