Search code examples
google-app-maker

Appmaker - combine fields from two datasources


I have two DATASOURCES in Google App Maker (both Google Drive Table's).

One is: Employee The other is: Department

I have created a relation between the two DATASOURCES (one to one) and can't figure out how to create a PAGE with a combination of fields from both DATASOURCES.

Any help is appreciated.


Solution

    1. You need to add prefetch for your relation (in datasource settings)
    2. If your main datasource is Employee, then in widget bindings you can access department with code similar to this:

      @datasource.item.Department.Name