Compound filter for a view
Hi All,
I would like to do a compound filter in a view by using a date range and a dynamic multiple choice. That way I can filter for one or more customer sales within a given date range.
here is the code for the date range placed in the view formula field:
what can I add to this code to use the dynamic multiple choice field for customers?
let xStart := 'StartDate';
let xEnd := 'endDate';
select SALES where 'Sale Date' >= xStart and 'Sale Date' <= xEnd
Thanks for looking!
Sam
30 replies
-
said:
when you have a chance, please attach the small database showing how you handled the filter.here it is. Open the Quick View then go to the Tab tab.
-
said:
I was hoping to also have the dMC available as well so that it can represent an easy access to filtering for a list of favorites.
I could do this with a switch or however you think it would best be facilitated.A switch would be my choice since you have 2 different fields to search on (with Customer being always used). You may want to do something like:
let xDMC := if dMC then 1 end; let xProd := if Prod then 2 end; let xMode := xDMC + xProd; switch xMode do case 1: filter only on dMC case 2: filter only on Products case 3: filter on both dMC and Products default: filter only on Customer end
Luckily it is only two fields that could be blank.
If you had a third field then it would grow.
let xDMC := if dMC then 1 end; let xProd := if Prod then 2 end; let xThird := if Third then 4 end; let xMode := xDMC + xProd + xThird; switch xMode do case 1: filter only on dMC case 2: filter only on Products case 3: filter on both dMC and Products case 4: case 5: case 6: case 7: default: filter only on Customer end
If there is a fourth field then maybe someone has a better system.
Content aside
- 1 yr agoLast active
- 30Replies
- 409Views
-
3
Following