Skip to main content
1-Visitor
June 4, 2014
Question

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

    1-Visitor
    June 5, 2014

    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.

    Translate
    1-Visitor
    June 5, 2014

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

    Translate
    1-Visitor
    June 5, 2014

    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.




    Translate
    1-Visitor
    June 5, 2014

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

    Translate
    5-Regular Member
    June 5, 2014

    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.

    Translate