cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Displaying text + image in a list.

martingalaz
1-Visitor

Displaying text + image in a list.

Can I bound two datasources to a List? like to get a text from a database displayed into and a Image from the FileRepository that matches with the text?

7 REPLIES 7
paic
12-Amethyst
(To:martingalaz)

Hi Martin, a List can only display one Field from one Datasource.

If you want to have Text with an image, I recommend you first use a service to combine the data into one infotable which you send to the Mashup. Next instead of the List use a Grid widget to display the information.

So how can I query a Database and query a FileRepository in once?

paic
12-Amethyst
(To:martingalaz)

Hi Martin, you can use a service to call other services.

So you can create a service in which you call a service that gets the info from the Database and also calls a service that gets the info from the FileRepository, after that you can use the InfoTable functions that we covered during training to combine the information.




Oh great, and instead a List I should use a grid? Can I use the list?

paic
12-Amethyst
(To:martingalaz)

A list can only display a single column of information, plus it will not be able to do images.

Ok, thanks Pai, also is there a way to disable the grid and unselected all items? like an event.

Martin,

Depending on your use case, you may be able to use the Repeater widget to display the icon + text in list format. Furthermore, the List widget does support images, but only when they are specified in State Definitions. If you only have a handful of items to display, this may be a good solution for you, otherwise I recommend using the Grid or Repeater.

Announcements


Top Tags