Simple search not working on dynamically setting search value for Activity2 Itemtype?

Hi Team,

I have Item A and have "Activity2" relationship Item. I m setting search value for one of the field in Activity2. On clicking of search it not working.

Following is way I am setting field search value

//Setting filter value in search dialog box
var Filter = {};
Filter["proj_num"] = { filterValue: 1333|1393, isFilterFixed: false };
return Filter;

proj_num is one of the OTB field in form

But if I Manually search with same value(1333|1393) it give result.

I don't know what is going wrong. Any one please can help me out of this?

Thanks in advance

Parents Reply
  • Hi Gaurav,

    I'm not 100% sure about the case sensitivity, but I believe the nodes of boolean operators like <OR>, <AND>, and <NOT> need to be capitalized. In addition, the <AND> tags in your AML are unnecessary in the current form of your query.

    Try replacing your AML query with the one below:

    var AMLQuery = "<Item type='Activity2' action='get'><OR><proj_num>1393</proj_num><proj_num>1333</proj_num></OR></Item>";

    As a general tip, I like to test the AML query I'll be using when I need to include a raw query like this in a method. You can use the built-in Nash application in your Innovator instance to test this query and make sure that it's returning the items you would expect. The first section of our blog post on AML covers how to access Nash.

    Secondly, when you're loading in AML like this as a filter, you'll want to use the code below instead of setting the idlist.

    inArgs.QryItem.loadXML(AMLQuery);

    Chris

Children