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
| RELEASE |
Normal 0 false false false EN-US X-NONE X-NONE