Hello,
I've been reading through all the great stuff here and found a solution to a question I had regarding filtering off of a user-prompt. I had to play with the inital format but eventually found a solution that worked.
The logic seems a bit off to me but the possibilities opened by this solution could really be huge for the report set we're working on, so understanding exactly WHY it functions is as important it working.
Here's the sample:
[rest of filter] and (1=if(Outage Filter and ?prompt?='YES') then (1) else if (?prompt?='NO') then (1) else (0))
Now, "outage filter" is a custom filter already built into the table to filter out incomplete records. So you dont need to add "and timein <> 0", it checks four different items to make sure they all exist.
If the user enters 'YES' the filter is applied, if the user enters 'NO' is isn't. This was veryified by removing the prompt and testing the data with and without the filter directly applied.
So! What's going on? I see the filter is being "tagged" onto a 'YES' response but as both 'YES' and 'NO' both result in a true 1=1 I'm not sure how far this same method could be taken.
I've been reading through all the great stuff here and found a solution to a question I had regarding filtering off of a user-prompt. I had to play with the inital format but eventually found a solution that worked.
The logic seems a bit off to me but the possibilities opened by this solution could really be huge for the report set we're working on, so understanding exactly WHY it functions is as important it working.
Here's the sample:
[rest of filter] and (1=if(Outage Filter and ?prompt?='YES') then (1) else if (?prompt?='NO') then (1) else (0))
Now, "outage filter" is a custom filter already built into the table to filter out incomplete records. So you dont need to add "and timein <> 0", it checks four different items to make sure they all exist.
If the user enters 'YES' the filter is applied, if the user enters 'NO' is isn't. This was veryified by removing the prompt and testing the data with and without the filter directly applied.
So! What's going on? I see the filter is being "tagged" onto a 'YES' response but as both 'YES' and 'NO' both result in a true 1=1 I'm not sure how far this same method could be taken.