eservice - add a dropdown to filter cases

Mar 5, 2009 at 3:28 PM
Edited Mar 5, 2009 at 4:52 PM
hi there,

everything (i think) working fine.  I would like to be able to add a filter - ideally as a drop-down to change from all cases to all my cases to all may open cases etc

Has anyone done this or know where to start?

looking at the aspx file it references msa:casesGrid

where would this be?

in the eservice configuration v1, "case list setting" doesn't seem to do anything, presumably because of the "active statecode value name"...

--edit--
case list setting seems to now show all cases - some delay before this worked - so good!

It makes the need for a filter more important as now there are 40+ cases and no way of seeing which are open/closed etc
Jul 20, 2009 at 10:59 AM

i worked around this:

1. set the default view to only open cases

2. create new page and update pages with links to it called "view all my cases" - set the page to use casegridall where it previously said casegrid

3. create a new casegridall control by copying previous casegrid control and .cs (within the control folder) - change internal references from casegrid to casegridall

4. comment out the relevant piece of code that does the filter - note there are two sections to comment out

a) (around line 140)

//Typically, the values for caselistsettings will be:
        //1 = display only OPEN cases
        //2 = display ALL cases
        //comment out below to show all cases - dan
        //if (Int32.Parse(Cache["msa.eService.CaseListSetting"].ToString()) == 1) //if the setting = 1 then only retrieve OPEN cases
        //{
        //    attributes.Add("statecode");
        //    values.Add(0);
        //}

b) (around line 203)

//Typically, the values for caselistsettings will be:
        //1 = display only OPEN cases
        //2 = display ALL cases
        //comment out - dan
        //    if (Int32.Parse(Cache["msa.eService.CaseListSetting"].ToString()) == 1) //if the setting = 1 then only retrieve OPEN cases
        //{
        //    fullUserQuery.Criteria.Conditions.Add(new ConditionExpression("statecode", ConditionOperator.Equal, 0));
        //}