Trying to make a relational join between a local source (MyStaff) and the external datasource Directory (my company's directory).
However, there isn't an option to relate them.
Was hoping to create a local datasource with custom fields that I can "append" to user records from the existing Directory datasource.
Any help is appreciated.
L.
There is no way to create relations between Directory Model and other model types. You have at least three ways to workaround this shortage:
One
Query directory records on the fly - this will okish work for single-record pages, but it will be tooo slow for lists.
Two
You can duplicate Directory fields you need in your tables.
Pros:
Cons:
You can find nice sample of the second approach in People Skills app.
Three
Query Directory data on demand. Let's say you have databound list, and records bound to the list have UserEmail field. In this case you can:
app.datasources.Directory.query.filters.PrimaryEmail._equals = widget.datasource.item.UserEmail;
app.datasources.Directory.load();
app.showPage(app.pages.UserDetails); // or app.showDialog(app.pages.UserDetails);