Topic: dbFilter test

Good evening everyone
I'm trying to test the MDV tools on the script code side, using a specific guide.

I attach project file.
For convenience I also left written the lines that don't work, so you can see some of the tests I did, commenting on the lines that block the program. Thanks

Re: dbFilter test

Hello Salavatore
Oups ! You've forgot to join your project.
What do you mean by "using a specific guide".
To use the scripts, you must first activate the dedicated button (fourth button from the left on the toolbar)
But I think you already know that.
JB

3 (edited by salvatorevicari85 2024-07-09 22:32:31)

Re: dbFilter test

Forgive me, I was sure I uploaded it. Here it is below.

Post's attachments

Attachment icon TreeView - Test - 1. dbFilter ecc.rar 295.97 kb, 29 downloads since 2024-07-10 

Re: dbFilter test

Tree filtering works differently.

1) Filtering at the database level
In order for the data to be displayed, the tree structure must be preserved, that is, the data remaining after filtering must have valid links to parents and at least one root element.

2) Filtering at the client level
In a loop, iterate through the elements of the tree and set their visibility property. This method is simpler, but only works with a small data set.

https://k245.ru/wp-content/uploads/2023/09/img-2023-09-16-16-08-38.jpg

https://k245.ru/mvdb/otobrazhenie-drevo … atsii.html
https://k245.ru/mvdb/otobrazhenie-tabli … annyh.html

Визуальное программирование: блог и телеграм-канал.

5 (edited by salvatorevicari85 2024-07-10 22:05:48)

Re: dbFilter test

very clear,
thank you very much k245
I will use the filter directly from the TV settings.

Re: dbFilter test

Good evening guys, I still haven't managed to reach my goal.
From the post that k245 published above, it is clear that Static Filters can only be inserted in the TV "Setting".
However, I would need a Dynamic filter on TV.
I have attached the latest test I carried out, but without obtaining the desired results. Even when I insert the filter, the application doesn't start.

For convenience I have also attached a screen shot, to see how I tried to link the filter to an ID box.

I also thought I could use one of these procedures
dbIndexToID
dbItemID
sqlvalue
, but I don't know how to implement the code.

A helping hand, thank you very much.

Post's attachments

Attachment icon 0. DBTEst Alfa.rar 757.71 kb, 16 downloads since 2024-07-12 

Re: dbFilter test

I'm still on this project.
I can't figure it out.
I've done several tests with the script, but none seem to work. The software doesn't give me any errors, but unfortunately it doesn't filter the data.
I attach the project.
Delete the comments and then press the "Filter in "FM_PEOPLE" button.

Post's attachments

Attachment icon z. Test - TreeView - 3. dbFilter su Immobili (test) (ancora niente).rar 758.98 kb, 11 downloads since 2024-07-14 

Re: dbFilter test

Hi,
As I understand from your project, all you want is to hold 3 levels of information:
House owners (Persone) who can have one or many properties (Immobili) and each property (Immobili) can have one or many partculars (immobili_UI).
This is pretty straightforward in MVD using 3 linked tablegrids.
The reason for your problems is because you are trying to use a tablegrid to filter data and display the filtered results in a treeview (filtering on treeviews as K245 wrote earlier, is conceptually very different).
Is there a reason why you need to mix tablegrids and treeviews rather than just using tablegrids?  (and at a practical level, I would think it's quite confusing for a user to have to enter data in both treeviews and tablegrids as the interface is quite different)
Derek.