Binding Datatable to Form like an Invoice

I am new to Webix but have been able to figure most things out using the sample code snippets on the site. There are multiple examples of how to link a form to a datatable but I looking for the reverse. I am unable to find an example of how to bind a datatable to a form element on load. I tried to use the bind , which works fine linking datatables based on a selection. Here is the code that fails, where projectID is a form element and buildtable is the datatable that contains all of the related records.

$$(‘buildTable’).bind($$(‘projectID’), function(obj, filter){
return obj.projectID == filter;
});

Ultimately I just used the onAfterLoad event to load the datatable using a query string on the server side script, but this is clearly slower than the bind. Filters seem to want a dedicated filter field on the user interface.

Hello @astec ,
Please take a look at the snippet:
https://snippet.webix.com/64ajo3qa

Here is the code that fails, where projectID is a form element and buildtable is the datatable that contains all of the related records.

In your case, most likely there was a problem with the source data and/or incorrect data filtering in the callback

Thank you for the snippet. Using your example I realized that it was a timing issue. I placed the bind statement inside an OnAfterLoad event for the datatable and its working perfectly.