Quantcast
Channel: aras PLM community
Viewing all articles
Browse latest Browse all 1103

Need HELP on Filtering

$
0
0

Normal 0 false false false EN-US X-NONE X-NONE

I have a filter setup so that it displays data based on another field. The filter works fine, but now I have been tasked to filter on two fields. The original filter needed to go to a Relationship table to retrieve its data, the new filter field can filter directly on the result of the first filter. The Highlighted area is what I added to the original filter, now I’m stuck.

Normal 0 false false false EN-US X-NONE X-NONE

///<SUMMARY>

///On Select Software, if there is a Model defined, only display Software defined as relationship in selected Model

///</SUMMARY>

 

///Get value from the source field///

var itm = inArgs.itemContext;

var model_id = top.aras.getItemProperty(itm,"model");

 

/// this is the new field I need to filter on///

var product_id = top.aras.getItemProperty(itm,"product");

 

if (!model_id){

                return;

}

 

///Select Relationship table to filter on source_id = model///

var softwareList = this.newItem("MIN_Model_Software_Catalog","get");

softwareList.setProperty("source_id",model_id);

softwareList = softwareList.apply();

 

///Store related_id’s in a Array///

var idArray = new Array();

for(var i = 0; i < softwareList.getItemCount() ; i++){

                idArray.push(softwareList.getItemByIndex(i).getProperty("related_id"));

               

}

 

///Filter Data///

inArgs.QryItem.item.setAttribute("idlist",idArray.join(","));

return("");

 

This is the result of the first filter. I  know need to filter on the highlighted

Normal 0 false false false EN-US X-NONE X-NONE

 

PRODUCT

MODEL

RELEASE

48F18D2A6EF04FF2A4CFF1E3CB8363BA

E05BD9A92D5D48C0895470EBC9B6EB71

In House Approved

48F18D2A6EF04FF2A4CFF1E3CB8363BA

E05BD9A92D5D48C0895470EBC9B6EB71

In House Approved

214B7B19203A47F2951010CDB8F2A48F

E05BD9A92D5D48C0895470EBC9B6EB71

In House

214B7B19203A47F2951010CDB8F2A48F

E05BD9A92D5D48C0895470EBC9B6EB71

In House

Normal 0 false false false EN-US X-NONE X-NONE

RELEASE

 

Normal 0 false false false EN-US X-NONE X-NONE

 


Viewing all articles
Browse latest Browse all 1103

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>