Hi,
I have a requirement where I have to filter the lookup data based on another field which can be free field or might be a lookup using Extensible framework.
Please help me out with this requirement.
Were you able to figure this out?
Hello,
It can be done with Extensible Framework to send input parameter in the List Of Value, and Screen designer to apply a filter on this LOV.
With JavaScript you must rewrite the LookupLOV and validateLOV , so you need to found there original definition before.
Here a case study: https://www.dropbox.com/s/2tx2vvgd2ioslio/HowToAddCondtionInLOV.pdf?dl=0
Regards
and do you know how to use it on the UDFCHAR field? For example, in the Grid Designer I created a grid with a variable that I would like to display under the POP-UP for the UDFCHAR01 field, but I don't really know how.
I will be grateful for your help.
Regards,
P.
Thanks for responding hloyer. I truly appreciate it.
@herve-loyer I understand the whole logic behind the Lookup and validate LOV.
My question is when I follow these steps to find the LOV name, I get an error:
? Open the lookup LOV? Open the console of chrome and execute the following script:vFormPanel = EAM.Utils.getCurrentTab().getFormPanel();vFormPanel.getForm().findField('assignedto').lookupLOV
Can you explain exactly what needs to be done to get the LOV name? or is there any alternative method to get the LOV name? I will be grateful for your help.
V
I am so exited by this published case study ... my work-a-round involved writing the data to a UDS and then basing my Dataspy or security filter o n the data I wrote to the UDS.
This technique is much more straight forward.Here is my code,, based on the new technique:My test case is, I added a sub-location on the WO screen that is a child of the "location" already on the form. I added a parameter :obj_parent to the LOV that looks at "location" on the screen.
setTimeout(updateLOV, 2000);
/* ************************************ *//* Custom Functions *//* ************************************ */
function updateLOV() {console.log('updateLOV: udfchar02 - LVUDFE');vFormPanel = EAM.Utils.getCurrentTab().getFormPanel();vLOV = vFormPanel.getForm().findField('udfchar02').lookupLOV;
/* Sample LOV = LVUDFE */
addParm = {'obj_parent':'location'};vLOV.inputFields = objectAssign({},vLOV.inputFields,addParm);}
/*Old Filter:d.des_code in (select obj_code from r5objects where obj_obtype = 'L' )
New Filter:d.des_code in (select obj_code from r5objects where obj_obtype = 'L' and obj_parent = :obj_parent)*/
function objectAssign(obj1, obj2, obj3) { Object.keys(obj2).forEach(function(k) { obj1[k] = obj2[k]; }); if (obj3 == null) { return obj1; } return objectAssign(obj1, obj3, null);}
*****************************************************
Note: addParm = {'obj_parent':'location'};is a New Parameter :obj_parent that looks at "loation" on the Screen.
Vyom:vFormPanel.getForm().findField('assignedto').lookupLOV;will raise an error if "assignedto" is not a field on the screen!