Topic: tGrid settings filter

I have two boolean field to display on tGrid.
I like to display only checked values.
Tried the following filter on tGrid settings/filter but didn't work:
(sale is 1) AND (replacement is 1)

Adam
God... please help me become the person my dog thinks I am.

2 (edited by derek 2017-03-26 10:38:52)

Re: tGrid settings filter

Hi Adam,
On the face of it, I would have expected what you've done to have worked - is there something else going on?
If you attach your example, someone might be able to spot something.
In my attachment (each grid filtered slightly differently), you see that it's quite tolerant of 'is' or '=' and any brackets.
Derek.

Post's attachments

Attachment icon adam tgridfilter.zip 337.28 kb, 389 downloads since 2017-03-26 

3 (edited by AD1408 2017-03-26 12:01:45)

Re: tGrid settings filter

Hi Derek,


Thanks a lot....


sale = 1 and replacement is 1
(sale = 1) and (replacement is 1)
The above ones didn't work. I get blank tGrid


However, when use only one as below works
sale= 1
or
sale is 1
replacement= 1
or
replacement is 1


In this case I need to use both - checked values only on same tGrid.
https://s16.postimg.org/rk562d9lh/zzzzz_Temp8.png


ps/. I downloaded ok after few minutes.

Adam
God... please help me become the person my dog thinks I am.

Re: tGrid settings filter

Hi Adam,
I've just re-uploaded it, just in case.  I've been able to then download it so I think it should be okay now.
Derek.

5 (edited by derek 2017-03-26 14:12:25)

Re: tGrid settings filter

Hi Adam,
So are you actually wanting to filter rows or just display them differently ('yes' and 'blank' rather than 'yes' and 'no')?
In that case, I'd use a couple of calculated fields (see attachment).
If you DO want to exclude rows (ie where they are neither a 'member' nor a 'smoker') then that's where you'd use a grid filter (in my example, I have two grids, one unfiltered (returning 7 rows) and one filtered (returning 5 rows).
Derek.

Post's attachments

Attachment icon adam tgridfilter2.zip 336.81 kb, 369 downloads since 2017-03-26 

6 (edited by AD1408 2017-03-26 19:10:21)

Re: tGrid settings filter

Great examples Derek... Thank you very much...


tGrid2 (with filter) what I was trying to do.
Main reason for the filter was applying footer count. My assumption was it'd count only cells with values displayed but it counts all cells therefore producing wrong count. Is it possible to count cells with values displayed only?
Sorry for the shortcoming on my side for failing to make all clear.

https://s27.postimg.org/64s0kze8z/zzzzz_Temp9.png

Adam
God... please help me become the person my dog thinks I am.

Re: tGrid settings filter

Hi Adam,
Using the 'standard' footer options that come with the grid , it will only count the number of rows.
To get totals for rows that contain certain values, you'd need to write a small script (one line for each total so it's not a big deal).
See attached.
Derek.

Post's attachments

Attachment icon adam tgridfilter3.zip 337.56 kb, 386 downloads since 2017-03-26 

Re: tGrid settings filter

Hi Derek,


GREAT Stuff..................
Thank you very much................................

Adam
God... please help me become the person my dog thinks I am.

9 (edited by AD1408 2017-04-11 04:57:56)

Re: tGrid settings filter

Derek provided boolean filter and correct footer count. Once again Thanks a lot Derek.....


Now, I tried but failed to add another filter to tGrids. I wanted tGrid under Organization 1 tabPage display only Organization 1 records and Organization 2, Organization 3 etc would use same filter to display peoples records belonging to selected Organization. Please see the ref image below:
https://s23.postimg.org/nrwscb95n/zzzzz_Temp19.png


Derek,
I also tried showing details next to tGrids without SQL, by using fake edit button. However, couldn't get it working.


Updated Sample project attached:

Post's attachments

Attachment icon tGrid Filter 4b.zip 8.7 kb, 402 downloads since 2017-04-11 

Adam
God... please help me become the person my dog thinks I am.

Re: tGrid settings filter

Adam,
Please find attached which I think is what you are wanting;  each page control grid displays as per your screen-shot (I assumed you also wanted the totals altering (ie 3 rows in total for Organisation 1 rather than 5,  2 members rather than 4 and  2 smokers rather than 3).
The 'fake' edit should also be working.
Regards,
Derek.

Post's attachments

Attachment icon tGrid Filter 4b.zip 341.37 kb, 410 downloads since 2017-04-11 

Re: tGrid settings filter

Thank you very much Derek...................
All works fine now.
Great stuff from you as usual..........

Adam
God... please help me become the person my dog thinks I am.