Filter - Comparison Value auto populate

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
craigforant
Posts: 1
Joined: 2015-09-25 17:22

Filter - Comparison Value auto populate

Post by craigforant » 2015-09-25 17:27

When using filters, can AppGini auto populate the Comparison Value field based on the selected Filtered field?

We have some criteria that often gets misspelled and it would lead to some errors in our filtered reports.

Please advise.

Thanks1

User avatar
a.gneady
Site Admin
Posts: 1287
Joined: 2012-09-27 14:46
Contact:

Re: Filter - Comparison Value auto populate

Post by a.gneady » 2015-10-01 21:54

Hmm .. you could write JavaScript code into the generated hooks/footer-extras.php file to implement this. If you are familiar with JavaScript and jQuery, here are some tips as a starting point:

* All the drop downs in the filters page are rendered using the select2 component -- select2 documentation: https://select2.github.io/select2/
* The filtered field dropdown has an id of FilterField_1_ for the first filter, FilterField_2_ for the second one, .. etc.
* The comparison operator dropdown has an id of FilterOperator_1_ for the first filter, FilterOperator_2_ .. etc.

So, you should write code to handle changing the filtered field and set the value of the filter operator.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

Post Reply