Filter more than two conditions on beforeget event.

We want to filter More than two conditions on beforeget event ,ex: field A = a or field B = b ,
we use this code:
Me.setAttribute("where","req_dep ='6D6AFDB5AC724CEFB5FDF78A489F576D' or req_person ='599478E276D94954A0BF7E17DEE122C4'")

It works to filter the frame.
but click the form to see contention will show this Error Message:  Failed to get the ItemType.

Anyone could give me a hint about it?

Parents Reply
  • Hi Christopher,

    There are currently no on beforeget or onAfterGet events on my itemtype.

    Figure 1 and figure 2 all on beforeget event:

    Now I filter a condition ,it works and double click can see the form's detail.

    code:

     (figure 1)

    This is my question,I want to show two different conditions at the same time(ex: A = a or B = b),it works but  double click  form didn't respond and click   will get an error:

     (figure 2)

    code:

Children
  • Hello,

    Since this is being done, could you try setting this condition outside of the where clause by just setting both properties in your query? e.g.

    Me.setProperty("req_dep", "YOUR_ID");
    Me.setProperty("req_person", "YOUR_OTHER_ID");

    This should effectively achieve the same result. Since this didn't start occurring until after you added in the filter on the where attribute, performing the query like this might work around the error. 

    Chris