Solved

Advance Search in IFS 9

  • 18 May 2021
  • 4 replies
  • 312 views

Userlevel 5
Badge +9

is it possible to use functions in advance search - IFS 9

 

icon

Best answer by Thushitha Chandrasiri 18 May 2021, 18:20

View original

This topic has been closed for comments

4 replies

Userlevel 7
Badge +28

Sort of, but only in the context of looking up values of fields or in the retrieval of a single sub-query parameter. 

Here is an example from the Part Costs overview:

 

CONTRACT IN ('410','510','582') and COST_SET = 1 and (&AO.INVENTORY_PART_API.Get_Type_Code(contract,PART_NO) = 'Purchased' or &AO.INVENTORY_PART_API.Get_Type_Code(contract,PART_NO) = 'Purchased (raw)') and COST_SET_LATEST_PUR_PRICE <> TOTAL_ACCUM_COST and TOTAL_ACCUM_COST <> 0.0001 and COST_SET_LATEST_PUR_PRICE > 0

 

Or here is one from Purchase Order Lines:

 

EXISTS(SELECT 1 FROM &AO.purchase_order_line_comp A

  WHERE A.ORDER_NO = PURCHASE_ORDER_LINE_PART.ORDER_NO

  AND   A.LINE_NO = PURCHASE_ORDER_LINE_PART.LINE_NO

  AND A.release_no = PURCHASE_ORDER_LINE_PART.RELEASE_NO

AND  NVL(A.QTY_REQUIRED,0) <> NVL(A.QTY_ISSUED,0)

  AND STATE <> 'Arrived'

  AND &AO.inventory_part_in_stock_api..Get_Inventory_Qty_Onhand(CONTRACT, COMPONENT_PART, NULL) > 0

)

Userlevel 7
Badge +20

Hi @proharikg ,

As it is there in the search naming (SQL where expression), we can use whatever it matches with where clauses

Userlevel 5
Badge +9

Sort of, but only in the context of looking up values of fields or in the retrieval of a single sub-query parameter. 

Here is an example from the Part Costs overview:

 

CONTRACT IN ('410','510','582') and COST_SET = 1 and (&AO.INVENTORY_PART_API.Get_Type_Code(contract,PART_NO) = 'Purchased' or &AO.INVENTORY_PART_API.Get_Type_Code(contract,PART_NO) = 'Purchased (raw)') and COST_SET_LATEST_PUR_PRICE <> TOTAL_ACCUM_COST and TOTAL_ACCUM_COST <> 0.0001 and COST_SET_LATEST_PUR_PRICE > 0

 

Or here is one from Purchase Order Lines:

 

EXISTS(SELECT 1 FROM &AO.purchase_order_line_comp A

  WHERE A.ORDER_NO = PURCHASE_ORDER_LINE_PART.ORDER_NO

  AND   A.LINE_NO = PURCHASE_ORDER_LINE_PART.LINE_NO

  AND A.release_no = PURCHASE_ORDER_LINE_PART.RELEASE_NO

AND  NVL(A.QTY_REQUIRED,0) <> NVL(A.QTY_ISSUED,0)

  AND STATE <> 'Arrived'

  AND &AO.inventory_part_in_stock_api..Get_Inventory_Qty_Onhand(CONTRACT, COMPONENT_PART, NULL) > 0

)

Thank you .. I have checked it and it is showing that functions can be used in advance search field..

Userlevel 5
Badge +9

Hi @proharikg ,

As it is there in the search naming (SQL where expression), we can use whatever it matches with where clauses

Thank you ..