i have an requirement of optimising below query rule used inside grid column ..

i have an requirement of optimising below  grid column , in the value of grid Column  i am fetching the required value from query rule.But i have to declare query rule in local variable first and then i have to use 

how shud i fetch the relevant value after using in local variable .

a!gridColumn(
label: "Data Type",
value: index(
rule!WFM_qeGetLookupRefDataByInput(
isActive: true(),
lookupRefId: fv!row['recordType!FWM_record.id]
),
"label",
{}
)
)

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    You will need to declare a local variable (say local!lookUpRefData) with value  rule!WFM_qeGetLookupRefDataByInput(isactive:true()). This rule should work as if when there is no lookupRefId passed, the output returns all the active ref Ids. 

    Then modify your gridColumn's value to index data from the local variable based on the record Id. E.g.

    index(
    index(
    local!lookUpRefData,
    wherecontains(fv!row['recordType!FWM_record.id],local!lookUpRefData.recordId),
    {}),
    "label",
    {}
    )

    Make use of appropriate columns names and you should have the correct data.

Reply
  • 0
    Certified Lead Developer

    You will need to declare a local variable (say local!lookUpRefData) with value  rule!WFM_qeGetLookupRefDataByInput(isactive:true()). This rule should work as if when there is no lookupRefId passed, the output returns all the active ref Ids. 

    Then modify your gridColumn's value to index data from the local variable based on the record Id. E.g.

    index(
    index(
    local!lookUpRefData,
    wherecontains(fv!row['recordType!FWM_record.id],local!lookUpRefData.recordId),
    {}),
    "label",
    {}
    )

    Make use of appropriate columns names and you should have the correct data.

Children
No Data