Hi All,
From the below code I'm trying to achieve the NAME of the filter should get from an Expression rule.
Suppose here my constant HD_DESIGNATION having three values SE,SSE and TL
but i should show in the record filter as Software Engineer, Senior Software Engineer and Team Lead.
So i have created a CDT with columns id,Desig,Desig_full (1,SE,Software Engineer) like that.
I have achieved this using if condition (commented below) but i need to get this from my expression. If i pass fv!index of SE it should show Software Engineer in the Filter.
a!recordFilterList( name:"Desig_For", options: a!forEach( items: cons!HD_DESIGNATION, expression: a!recordFilterListOption( id:fv!index, name: rule!HD_ER_DesignationFull(id: fv!index).data, /*if(*/ /*fv!item="SE","Software Engineer",*/ /*if(fv!item="SSE","Senior Software Engineer",*/ /*if(fv!item="TL","Team Lead",""*//* */ /*)*//* */ /*)*/ /*),*/ filter: a!queryFilter( field:"designation", operator:"=", value:fv!item ) ) ), )
using the above code I'm getting like this, but i need only "Software Engineer"
Thanks in advance
Discussion posts and replies are publicly visible
This is because your query rule!HD_ER_DesignationFull(id: fv!index).data is returning a dictionary. Try
index(rule!HD_ER_DesignationFull(id: fv!index).data, "designation_Full",{}) for the name parameter
Wouldn't it be easier to use a decision table to map short names to long names? Calling database for each item feels a bit strange.