Skip to main content
1-Visitor
December 12, 2017
Question

How to fill a repeater in thingworx studio

  • December 12, 2017
  • 1 reply
  • 2395 views

Hello,

I'm new to thingworx studio and have to get familiar with it.

i have objects, that each have an image(contained in my Resources), a title and a description. In the later code those will be retrieved dymanically and can be of arbitrary number.

For now i've created test-data like this:

  var obj1 = ["img1", "title1", "description1"];

  var obj2 = ["img2", "title2", "description2"];

  var obj3 = ["img3", "title3", "description3"];

i guess the best way to display them would be in a repeater. So I have created one and filled it with an image view and two labels.

How do i assign the date to it? (I know how to assign text to a label using application parameters)

1 reply

21-Topaz I
December 13, 2017

Hi Jovan. You can utilize getDate(), getMonth(), and getYear() JS functions to get the desired date you are looking for.

1-Visitor
December 14, 2017

Sorry, I don't understand your answer. How are these functions going to help me set the data for my repeater?

21-Topaz I
December 14, 2017

Whoops. In your initial question it looked like you had asked about adding the date, not data. What data are you looking to assign to your repeater?