cancel
Showing results for 
Search instead for 
Did you mean: 

i5Grid MII 14 MDO Filter Expression

0 Kudos

Hi Guys,

I am building a sample webpage to display MDO query data using I5Grid.

I am not sure if I am missing any lines. attached is my code and the webpage is empty with no errors on the browser console

If I remove the below lines, the grid appears, but i need the filter expression and be assigned at runtime.

dashBoard.getQueryObject().setFilterExpr("[dept] = CSEE");

dashboard.update(true);

Kindly help me with this.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try mentioning CSSE in single quote like this 'CSSE'. Itried like this in my example and it worked for me. you can even check the filter exprn which is applied using getFilterExpr method.

Grid.getQueryObject().setFilterExpr("[Regression_15.0/MIIOBJ/Employees2.etype] = 'Permanent'");

Hope it helps.

Regards,

Sriram

0 Kudos

Thanks for responding sriram,

Please help me understand what [Regression_15.0/MIIOBJ/Employees2.etype] is.

Answers (1)

Answers (1)

rutika_bodas
Participant
0 Kudos

Sunil,

What Sriram is trying to say is that you need to give your filter expression's key value also as a string character, not just the filter expression itself as string.

For that all you need to do is escape the quotes and pass your value. That is,

setFilterExpr("[dept] = \"CSEE\" ");

OR

setFilterExpr("[dept] = 'CSEE' ");

One of these should work.

Regards,

Rutika Bodas

0 Kudos

Rutika,

I understood that one,

further to that, should the input parameter, in this case [dept], should be a MDO query object's paramter say [param.1] or attribute of the MDO?

Thanks

Suneel    

Former Member
0 Kudos

Hi Suneel,

2 things. If you want to use Param.1 you can do like this

1) In MDO Select Query, we have to mention Filter Exprn as [dept]=[Param.1].

Here Param.1 is the MDO Object Parameter and [dept] is the attribute of MDO.

In Parameters(Under Template Categories of MDO Query) you have to give the value of Param.1 and select type as String from the drop down.

Now in IRPT you have to use setFilterExpn method in either of the ways rutika mentioned.

2) you no need to give Filter exprn in MDO Select query as [dept]=[Param.1] . If you dont give filter exprn here it will give actual data of MDO and anyway you are changing it through IRPT page.

I am attaching Video for your reference pls go through it.

https://www.mediafire.com/?zsl46qii26lqkr2

pls download the video from that link. I tried to insert video directly in this message but quality is lost. So pls download it from there. Sorry for the inconvenience.

Regards,

Sriram

0 Kudos

Thanks a lot for the video Sriram

unfortunately, it still isnt working for me. attached is the screenshot of the irpt in workbench and browser.

Few other points to note. in the browser console there is a 404 error on

XMII/JavaScript/resources/messages_en_US.properties

Also how do you bluecrystal theme in MII?

Former Member
0 Kudos

Hi Suneel,

As ID is an Integer field there try like this  [ID] = 1 . without single quotes. single quotes are required only if the value is String.

Regards,

Sriram

0 Kudos

Tried that one to Sriram, same result.

Few other points to note.

1.In the browser console there is a 404 error on

      XMII/JavaScript/resources/messages_en_US.properties

2. In the browser console, filter expression is blank. could this mean anything?

HH:mm:ss","Debug":"false","DisplayNames":"","Duration":"60","DurationUnits":"M","EndDate":"","FilterExpr":"","Group":"","GroupingExpr":"","InlineTransform":"","IntervalCount":"1","JoinExpr":"","MDO":"RBL_TEST_PRJ/MIIOBJ/TESTMDO","Mask":"","Method":"","Mode":"Select","NumberFormat":"0.00","ObjectParam.1":"","ObjectParam.10":"","ObjectParam.11":"","ObjectParam.12":"","ObjectParam.13":"","ObjectParam.14":"","ObjectParam.15":"","ObjectParam.16":"","ObjectParam.17":"","ObjectParam.18":"","

Former Member
0 Kudos

Hi suneel,

It worked for me.

I tried this in 15.0 version and it worked. I haven't checked in older versions of 14.0. I am not sure about the console error that you are facing.

Can you try 1 more thing.

add this line too in your code  After the step of setFilterExpr()

alert(grid.getQueryObject().getFilterExpr());

We will get to know whether setFilterExprn is applying filter or not.

Regards,

Sriram

0 Kudos

Yes the filter says [ID] = 1,

I am thinking if the console error has got something to do with this.