Getting error in User interface at where condition

I am below error in user interface.Please help to resolve.

Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function 'wherecontains' [line 52]: Invalid types, can only act on data of the same type (Text, Any Type)

Below is the Code and the place where wherecontains is there is highligted in red.Please help to resolve as to what changes needs to be done.

ri!selectedSkuId
),
local!selectedSku: a!refreshVariable(
refreshAfter: "RECORD_ACTION",
refreshOnVarChange: local!selectedSkuId,
value: rule!APN_first(
index(
local!skus,
wherecontains(
local!selectedSkuId,
local!skus['recordType!{9de47fad-3776-4334-bca6-7870632f65f6}NGP_PC_Sku.fields.{821936eb-32c0-4523-ab28-06972108537f}pcSkuId']
),
{}
)
)
),
{
a!columnsLayout(
columns: {
a!columnLayout(
contents: {
rule!NGP_PC_CMPT_skuInfo(
skus: local!skus,
refCountries: local!refCountries,
selectedSkuId: local!selectedSkuId,
selectedSku: local!selectedSku,
defaultSelectedSkuId: local!defaultSelectedSkuId,
disableProductSelection: ri!disableProductSelection
)

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Use touniformstring() to turn your local!skus['recordType!{9de47fad-3776-4334-bca6-7870632f65f6}NGP_PC_Sku.fields.{821936eb-32c0-4523-ab28-06972108537f}pcSkuId'] into a list of text.

  • getting below error

    Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error in rule 'ngp_pc_cmpt_skuinfo' at function a!dropdownField [line 14]: A dropdown component [label="Select SKU"] has an invalid value for "value". Value cannot be null if placeholder is also null.

    Changed the code as below:

    index(
    local!skus,
    wherecontains(
    touniformstring(local!selectedSkuId),
    touniformstring(local!skus['recordType!{9de47fad-3776-4334-bca6-7870632f65f6}NGP_PC_Sku.fields.{821936eb-32c0-4523-ab28-06972108537f}pcSkuId'])
    ),

Reply
  • getting below error

    Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error in rule 'ngp_pc_cmpt_skuinfo' at function a!dropdownField [line 14]: A dropdown component [label="Select SKU"] has an invalid value for "value". Value cannot be null if placeholder is also null.

    Changed the code as below:

    index(
    local!skus,
    wherecontains(
    touniformstring(local!selectedSkuId),
    touniformstring(local!skus['recordType!{9de47fad-3776-4334-bca6-7870632f65f6}NGP_PC_Sku.fields.{821936eb-32c0-4523-ab28-06972108537f}pcSkuId'])
    ),

Children