+ Start a Discussion
AD1AD1 

Retrieve data from two different data objects using single data connection.


I am using Site.com.

Different data elements are available in Site.com studio like Data Repeater, Data Table and Data Element to connect with the data objects.

I have to display data on my site.com page from two different objects. Both the objects have common field as a relation between them.

How can I create a single connection using above mentioed data elemnets to retrieve data from two different data objetcs?


Thanks
AD

Kevin VenkiteswaranKevin Venkiteswaran

You can setup a data repeater as a child of another data repeater. Site.com will automatically use the relationship between the data objects, and optimize the underlying query, if possible. If it's not possible you'll receive a warning when editing the child repeater.

 

Data elements are bound to their closest parent data repeater. That is, to display a field from the parent repeater's object place a data element as a child to that parent data repeater. To display a field from the child repeater's object place a data element as a child to the child data repeater.

AD1AD1

Thanks Kevin.

 

The information you proveded is quite helpful to us.

 

As you mentioned, I came to know that one can  access data for multiple levels (parent-child levels) by nesting data repeater element or data table element, but I could not find the mechanism to pass the filter criteria to the child objects.

 

As we can apply filter (use Query string), connection autometically access the query string and gives the filtered records, could the nested or child repeater/table elements get the specific filter from the outer/parent repeater/table element and produce the filtered result set?

 

Please refer below scenario for reference.

 

There are three Objects:
    1. Movie:
            movieId
            movieName

    2. Theater:
            theaterId
            theaterName
            movieId
    3. show
           showID
           theaterId
           showStartTime
           showEndTime

We need to display information about the theaters available with the show timings for each movie released current week. For that we need to have join between thease objects, we would need to retrive show timings by theaterId and showId, so need to pass filter to respective objects.