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
    1 month ago

    Based on Harsha's example, you can also use the displayvalue() function. It looks for a value in the first list, and returns the item from the second list at the same index.

    a!localVariables(
      local!data: {
        a!map(key: "one", value: "theOne"),
        a!map(key: "two", value: "theTwo"),
        a!map(key: "three", value: "theThree"),
      },
      displayvalue(
        "two",
        local!data.key,
        local!data.value,
        null
      )
    )

Reply
  • 0
    Certified Lead Developer
    1 month ago

    Based on Harsha's example, you can also use the displayvalue() function. It looks for a value in the first list, and returns the item from the second list at the same index.

    a!localVariables(
      local!data: {
        a!map(key: "one", value: "theOne"),
        a!map(key: "two", value: "theTwo"),
        a!map(key: "three", value: "theThree"),
      },
      displayvalue(
        "two",
        local!data.key,
        local!data.value,
        null
      )
    )

Children
No Data