Topic: Question on Search with filter!!!!!

Hi.
I would like to know if what I indicate in the image can be done?

The goal is for the grid content to change as the Combobox changes

Post's attachments

Attachment icon grid_filter_q.png 70.74 kb, 146 downloads since 2020-05-23 

2 (edited by derek 2020-05-23 23:33:28)

Re: Question on Search with filter!!!!!

Hi Wenchester,
Yes, it can be done but not quite as you show it in your image.  You can only put a 'static' ('fixed') filter in a tablegrid filter.
To change the contents of a tablegrid depending on the combobox selection, try doing it as in the attachment.
I have shown 2 ways -
1.  the first way uses a combobox to filter records but you need to click into the combobox each time to re-select records.
2.  the second way uses a tablegrid instead of a combobox to filter the records, but the process is identical.  Now you can just click in the 'country' tablegrid (or use the 'up' and 'down' arrows to scroll);  it makes it quicker and perhaps more user friendly.
Hope this helps,
Derek.

Post's attachments

Attachment icon wenchester.zip 337.95 kb, 251 downloads since 2020-05-24 

Re: Question on Search with filter!!!!!

Hi Derek, thanks first of all.

What I want to do is a little more complicated (I attach an example with a note in the form). There are 2 tables (people, subject) that have reference to another table (course). What I'm looking for is that in the grid of the people form, only the records associated with the course in question appear, and not all

Post's attachments

Attachment icon wenchester_v2_fix.rar 294.16 kb, 288 downloads since 2020-05-24 

4 (edited by derek 2020-05-24 23:30:10)

Re: Question on Search with filter!!!!!

Hi Wenchester,
I'm not sure from your attachment whether a person should have ONE course (and multiple subjects within that course) or whether a person should have MULTIPLE courses (and multiple subjects within multiple courses). 
The data structure (a 1:1 relationship between 'people' and 'courses') indicates it's just ONE course and the 'search form' and the 'people' form would indicate that too. 
But the 'subject' form (subject.combobox1) allows for different 'courses' to be selected from the course specified on the people form (people.combobox1).
Can you clarify which is correct - one course per person or multiple courses per person?
This might be why your application isn't working as you want it to.
Derek.

Re: Question on Search with filter!!!!!

A person goes through multiple courses (years) at their school (eg 1st year, 2nd year, etc.), and in each course they receive multiple subjects. What I want is that depending on the course in which the person is, the subjects they received in that course appear on the grid.
Greetings, wenchester

Re: Question on Search with filter!!!!!

Hi Wenchester,
There are different approaches you can take;  I guess it all depends on what the overall aim of the project is.
In the attachment are 3 options:
1) is basically the project that you attached earlier that I've changed to only show the relevant records in the tablegrid depending on your selection..
2) (Option A) filters from 'Pupil' to 'Year' to 'Subject' in a strict hierarchy.
3) (Option B) is more 'mix and match' where you can select any combinations of 'pupil', 'year' and 'subject' filters.
Which (if any) suits you best, depends, as I said, on what and how you want your project to work.
Regards,
Derek.

Post's attachments

Attachment icon wenchester.zip 1016.71 kb, 288 downloads since 2020-05-29