1. Kevin
  2. Valentina Studio
  3. 土, 2月 27 2021, 09:25 PM
  4.  メールで購読
Hi,

My main form is based on a table (tbl_Transactions).

The form contains a TableView based on a query (qry_Transactions).

The form contains two comboBoxes. Each contains a different query. Both queries are based on fields in the tbl_Transactions table.

The form's purpose: a complex filter. (Thank you for the Simple and Complex Filter tutorials!)

The form works, but I am confused on a few things.

The Query, Records, Table, and View Templates folders contain similar templates (Add Filter, Apply Filters, ...). Which one do I choose? More than one?

If one's main form is based on a table, does one use the Table Templates folder or the Records Templates folder? Or, using the example above, the main form is based on a table and the form includes a TableView based on a query, which one does one choose? Or is this a case one needs this Templates folder for these types of actions and one needs that Templates folder for those types of actions.

Thanks,

Kevin
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hi Kevin,

All of these templates are applied to the cursor based on the source object of the form.
In case of the TableView, it is necessary to filter records of this TableView itself, e.g.:


r = this.TableView.records;
r.addFilter( 'amount < 2' );
r.applyFilters();

this.TableView.records = r;


For now, the last row is necessary for the update of the TableView.
コメント
There are no comments made yet.
Kevin 承諾済みの回答
Sergey,

Thank you and thank you for the example!

Kevin
コメント
There are no comments made yet.
  • ページ :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.