Question

Error in validating custom field

  • 21 February 2022
  • 1 reply
  • 199 views

Userlevel 1
Badge +2

Hi, does anyone know what might be wrong with the below code. When I try to add this to a custom field, I get error in validating the field. I’m using two different IAL’s which is located on ifsinfo domain:

 

SELECT 
CASE WHEN &AO..PART_CATALOG_API.Get_Configurable_Db(a.PART_NO)='CONFIGURED' THEN a.QTY_ONHAND*c.CONV_FACTOR_M3ELSE a.QTY_ONHAND*b.CONV_FACTOR_M3END as M3 
FROM INVENTORY_PART_IN_STOCK a 
LEFT JOIN &IAL..M_CONV_FACTORS b ON a.PART_NO = b.PART_NO AND &AO..INVENTORY_PART_API.Get_Unit_Meas(a.CONTRACT, a.PART_NO)=b.UNIT_CODE AND b.CONV_UNIT_CODE = 'N_M3' 
LEFT JOIN &IAL..M_CONV_FACTORS_KONFIG c on a.CONTRACT = c.CONTRACT AND a.PART_NO = c.PART_NO AND a.CONFIGURATION_ID = c.CONFIGURATION_ID AND c.CONV_UNIT_CODE = 'N_M3' 
WHERE a.CONTRACT IN ('163','272','2721','2722') AND a.CONTRACT = :CONTRACT AND a.PART_NO = :PART_NO AND a.CONFIGURATION_ID = :CONFIGURATION_ID
;

 

I’ve tried different solutions for the &IAL parameter. I’ve tried to write ifsinfo, &IAL. and &IAL..

 

Is it not possible to use custom made IAL in custom field creation?

BR
Jonas


This topic has been closed for comments

1 reply

Userlevel 4
Badge +12

@JOKA227 

I don’t see any prohibition to selecting from an IAL.  I tested using ifsinfo.<viewname> and it validated and brought back the correct data.  

If what you pasted in is exactly what you’re using for the custom field, I’d do/check the following:

Check your spacing on the code.

Remove the “;” at the end.

Remove the app owner parameter - you don’t need it for custom fields.

Verify that the permission set you are assigned to has been granted access to the IAL you are trying to reference.

Verify that the permission set you are assigned to has access to the APIs.

Post the validation error that you are receiving.