Base two parameters master-double filter

Hi,
I have been trying to apply two filters in the same form as it was explained in the tutorial
https://wiki.documentfoundation.org/images/e/e8/BH40-BaseHandbook.pdf at page 113.

My subform is actually a query, when i try to filter it with one parameter it works fine, while, when I try to filter it with two fields, so passing two parameters in the MASTER-SLAVE link, when I press the button, nothing happens.
I attach the link to my file. The Form that I am trying to work out is called “company calling v1.1”.
Can any guru help me please? I have been working on it for hours with no success.

https://docs.zoho.com/file/4kih3c71ca12490924d8f92286c2d90efaf05

Thanks in advance
Regards
Tommaso

Hello,

Your form and what you are attempting is confusing. On the referred to form internally the main form is named ‘Filter’, the subform named ‘Form’ and the sub sub form named ‘Form’. Now while this can work it requires extreme care. Use more meaningful names.

Next is the SQL used in sub form ‘Form’. Here you never refer/compare values to the Filter table values you saved from the list box selections. This is a main problem and causes this to not work in any way. Now since you are using a Filter table and SQL to retrieve results, there is no reason (in fact it hurts) to have “Master” & “Slave” links on the sub form.

This may correct your immediate problems but I still question the construct of this form. If your intent is to just view data you are probably OK. If you are looking to update or enter new data you will most likely run into problems since you combine multiple tables in the query.

If you require further assistance on this SQL, please also provide further information on what this for is to be used for - inquiry, updating, both, other?

Edit:

To hopefully further assist, I have re-attached your file with an added form - CompanyCallingRevised. Take a look at it and see if this is what you are looking for. The major change is in actual SQL for the Company form selection.

Revised form sample: 20171207 CRM SETA Revised

If this answers your question please click on the :heavy_check_mark: (upper left area of answer).

Hello,

thank you very much for your help and your response. Your form appears to have the same problem of mine. It was late at night and my explanation was probably confusing.

What I am trying to achieve is to use the two filters in the form ‘Filters’ to filter data in the form below ‘Form’ (which is actually and SQL query).
I don’t want to modify data in this form

I reattach the file with adjusted names.
https://docs.zoho.com/file/4kih32e95fef96c514bde829c14a093d683d7

Thanks
Tommaso

@Tonziponzi97 I am not sure you examined my form well enough. First, your form does nothing as it does not use the Filter table at all. Now look again at my form. Choose Italy & Consumer Goods, 20. Display Results using button. This gives a single record in ‘selected Country’ grid. This is the only company in your tables with a sector_id record of 20 in Italy… This company has one Action record displayed in lower grid.

Choose Germany & Consumer Goods, 20. Display Results using button. This gives two records in Country grid - ‘cici’ & ‘eoioi’. ‘cici’ has no Action records but if you select ‘eoioi’ there are two action records.

Now as stated before, this is confusing. If this is not what is wanted, you have not explained what results you expect when selections are made. But certainly this form I added does NOT depict the problems your form does.

I would be happy to help further if needed.

I see you have closed the question. If this has answered your question please click on the :heavy_check_mark: (upper left area of answer). If there are still problems please explain.

@Ratslingler, thank you very much. I attach what I wanted to do. At 4am I was trying to insert field in the wrong spot. Thank you very much for your help though. (I tried to use your filter but whatever I press and select the table below does not change. Maybe a problem with download or a conflicting version?

@Tonziponzi97 Thank you for responding. As I always test my posted samples (OK I miss once in a while) I don’t understand why this didn’t work for you. It worked when I downloaded. Not certain what you changed on you form but it now produces the same results I achieved on my form. Just a note, my form was named differently; see name in answer.

Hi @Ratsingler, your solution worked great and I applied it everywhere, I now realise though that the results is not editable. Is there anyway to make it editable?
Regards
Tommaso

@Tonziponzi97 Have checked the sample attached & adding/changing ‘Action’ records works. If you are looking to do something with the ‘Company’ information, that was mentioned in the answer months ago that it would be a problem.

If you have further questions, they are welcome. However, since this question has been answered, you should ask as a new question and provide specifics.