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