Filtered Data from Fusion Table in another FT infowindow using the FT UI - google-fusion-tables

Is it possible to embed an iframe with filtered data coming from a FT?
I have two Fusion Tables, one Parent and one Child.
They have a matching ID column.
What I need to do is to be able to show filtered data from Child Table into every infowindow of the Parent Table according to their matching ID column (sort of one-to-many connection).
Building on the link generated from the Child FT UI, I could generate a unique "filtering" link utilizing the matching ID column of the Parent Table inside the Custom Card panel.
Is it possible?

It's possible, but not with a template, because <iframe/>'s will be removed.
Modify the infoWindowHtml-property of the FusionTablesMouseEvent
google.maps.event.addListener(layer,'click',function(e){
e.infoWindowHtml+=
'<iframe width="100%" src="https://www.google.com/fusiontables/embedviz?'+
'viz=CARD&q=select+*+from+childTableId+where+ID+%3D+'+
e.row.ID.value+'&cpr=1"></iframe>';
});

Related

Vaadin one to many Grid binding and expanding child entity

There is the Customer entity which has a one to many relationship to entity Address,so there is a List<Address> getAddress in Customer.Entity Address has three columns,Street,City and Country.
So for instance to get the address details for one customer with two addresses you do
customer.getAddress.get(0).getStreet
customer.getAddress.get(0).getCity
customer.getAddress.get(0).getCountry
For the second address you do
customer.getAddress.get(1).getStreet
customer.getAddress.get(1).getCity
customer.getAddress.get(1).getCountry
Is there a way to display one row for the Customer details and display a sub-grid or (just dump the Address object's contents) that
expands the Address entity and shows the two address rows with the 3 columns?
In essence show the parent and expand the child.I was looking at TreeGrid but it requires a single type of bean like TreeGrid and I don't know how Address would fill into the picture.
Does the basic Grid have a feature like that? I see that you can add different types of columns with addComponentColumn,but is that only for UI elements,like adding buttons etc ?
you could use a LitRenderer for that, but displaying this much data in a grid would extend the height of a row a lot.
With addComponentColumn you can add any Component you want, like a single Button, Image or a more complex Layout that you created.
Like Tatu Lund suggested you can use the ItemDetailsRenderer. There you can implement a LitRenderer or a ComponentRenderer. Then you can display all complex information about the customer.

Filter similar records in a table using Dblookupcombobox

I have a dblookupCombobox that is connected to an access table feeds using a datasource and adoquery. I have used the listsource, keyfield, and listfield properties to connect it to the feeds table field name feedtype. problem is that dblookupComboboxshows repetitive records. Is it possible to filter the records and show only one record? Or how else can I achieve this?
The listsource and listfield should really come from another table, even if it's constructed table such as
SELECT DISTINCT feedtype FROM feeds AS lookup.
Create another adoquery and use that to get the list of DISTINCT values, then use that for your listsource.
I always create a specific lookup table where users can manage the valid entries.

Nested Result set(Child and Parent) on same table

I'm using Entity framework to bring in the data to a mvc application.
The table contains 2 columns, One column contains the IDs(string) and other contains SQL Queries(string). I want to bring the data to a grid which will have 3 columns i.e. ID, Query and the result of that Query.My plan of approach was to bring the 2 columns in though a parent result set and get the result of the queries in a child result set and display them on the grid. How to I approach this?

Backendless iOS: intermediate table between two tables

I am new in Backendless and I have read all the manuals about relations, but still not sure how to create san intermediate table between two tables.
For instance, I have table called users and tables called Events. A user can subscribe to events. So I want new table UserEvents, which has user_id and event_id. Also, how would I retrieve all events added by user? In other words, how to do joins in Backendless?(I suppose there is no joins and everything much simpler though).
Thank you very much!
There are two separate questions at hand here:
How to create relationships between objects?
How to load objects created by a user?
Let's start with the first one:
How to create relationships between objects?
When you work with Backendless it is important to think in terms of objects and not tables. For example if there is an entity called Order and it contains a collection of OrderItem objects, then THAT is your data structure. You do not need to pre-create tables in console – Backendless will do it for you the very first time you save an Order object which has a collection of OrderItems. However, if you would like to do it by hand in our Console, here are the steps:
Login to console, select an app, click on Data
Create table Order (it is better to name tables in the singular form - so Order, not Orders).
When you create a new table (click the "+" button in the lower-left corner), console will prompt you to switch to Schema Editor so you can add some data columns. A column would correspond to a property in the class which represents a record from the table.
Now that the Order table is in place, repeat the process for the OrderItem table.
Once both tables exist, we need to "link" the tables together. That link would establish a relationship which can be either one-to-one or one-to-many. To do this, select the Order table and click the Table Schema and Permissions red button in the upper right corner.
Click the Add Relationship button.
In the popup that appears, you will need to create a property which will contain a collection of order item objects. Name that property "orderItems" (it is okay to make it plural here). On the right side of the popup select the OrderItem table. In the Multiplicity drop-down select Many.
Click Save. At this point the relationship is established.
To see it working you can either use the code generation module which will give you all the source code for working with the tables. Click the Code Generation icon. In the Android section, select either Eclipse or IDEA in the IDE block, then click the Java classes for defined data tables option. Click Download Project. Backendless will generate a ZIP file with the source code for the client-side classes that will let you perform a full CRUD (Create, Retrieve, Update, Delete) range of operations on your tables.
The documentation describes how to work with related data. For instance, see the approaches and API for retrieving related objects.
Things are simpler when it comes to the question of how to load objects created by a user. So we come to the second question:
How to load objects created by a user?
The approach described above works equally well for linking the built-in Users table with any other table. However, specifically with the Users table, that link/relationship is not necessary. The reason for this is Backendless automatically tags any created object with the ID of the "owner", that is the user who created the object. That "tag" can be seen with the special ownerId property in the Users table. To enable retrieval of the objects which belong to the user, we need to modify the security permissions for the table which contains the objects created by users:
Login to console, select your app and click the Data icon.
Select the table with the objects created by users.
Click the Table Security and Permissions red button in the upper right corner of the screen.
Click the Role Permissions menu item.
Locate the cell at the intersection of the Find column and the AuthenticatedUser row. Click the cell until you see a red cross.
Repeat the previous step for the intersection of the Find column and the NotAuthenticatedUser row.
At this point you restricted all access to your table for both authenticated and not-authenticated (guest) users. The next step will allow the owners to retrieve the objects which they created.
Click the Owner Policy menu item.
Click the cell in the Find column until there is a green check mark.
At this point when you call any of the Find methods on that table, Backendless will return only the objects which belong to the currently logged in user.

How to show selected items of certain table on the different table in Dynamics AX 2012?

So, I have two tables InventTable (for inverntory) and MyCartTable. I want to connect this tables so when I chose some item or items in InventTable to show in MyCartTable's grid. MyCartTable fields are ItemNumber, ProductName, PartyID;
Assuming you are working with AX 2012:
On your MyCartTable, remove the itemNumber field.
Open an other AOT windows go to Data Dictionary - Extended Data Types and locate the itemId data type. Drag and drop this data type on your table. AX will ask if you want to add a foreign key relation. Click yes, this will add a relation to the InventTable to the relations node of your table.
Now on your form, set the JoinSource property of your MyCartTable to you inventTable data source.
If you are having trouble making this work, create a new form with only those two datasources and a minimum amount of controls (like just 2 grids), this allows you to test this more easily.

Resources