Grid is not population on selection of one field

I have one page where i have two filters. One Apple filter is working but another mango filter is working only after selection of apple filter.

Both drop down are similar code but why data set is not getting update on selection of mango filter. Same issue coming at rule level also where i am calling one entity. Please share your inputs on that.

with(
local!testDataSet: rule!RAS_getFruitDataSet(
selectedApple: local!selectedApple,
selectedMango: local!selectedMango
),

a!dropdownField(
label: "Apple",
labelPosition: "ADJACENT",
placeholderLabel: "--- Select a Value ---",
choiceLabels: union(
index(
local!testDataSet.data,
"apple",
null
),
index(
local!testDataSet.data,
"apple",
null
)
),
choiceValues: union(
index(
local!testDataSet.data,
"apple",
null
),
index(
local!testDataSet.data,
"apple",
null
)
),
value: local!selectedApple,
saveInto: {
local!selectedApple
},
validations: {}
),
a!dropdownField(
label: "Mango",
labelPosition: "ADJACENT",
placeholderLabel: "--- Select a Value ---",
choiceLabels: union(
index(
local!testDataSet.data,
"mango",
null
),
index(
local!testDataSet.data,
"mango",
null
)
),
choiceValues: union(
index(
local!testDataSet.data,
"mango",
null
),
index(
local!testDataSet.data,
"mango",
null
)
),
value: local!selectedMango,
saveInto: {
local!selectedMango
},
validations: {}
)
)

 

 

 

 

Type of ri!selectedMango is Number(Integer)
ri!selectedApple is text

a!queryEntity(
entity: cons!RAS_MASTER_DATASET_REPORT_V,
query: a!query(
selection: a!querySelection(
columns: {
*****
}
),
logicalExpression: if(
and(
rule!APN_isBlank(
ri!selectedApple
),
rule!APN_isBlank(
ri!selectedMango
)
),
null,
a!queryLogicalExpression(
operator: "AND",
filters: {
if(
rule!APN_isBlank(
ri!selectedApple
),
{},
a!queryFilter(
field: "apple",
operator: "=",
value: ri!selectedApple
)
),
if(
rule!APN_isBlank(
ri!selectedMango
),
{},
a!queryFilter(
field: "mango",
operator: "=",
value: ri!selectedMango
)
)
)
}
)
),
pagingInfo: rule!APN_pagingInfoAll()
)
)

  Discussion posts and replies are publicly visible

Parents
  • Please use below code and check if it works using single input


    a!queryEntity(
    entity: cons!RAS_MASTER_DATASET_REPORT_V,
    query: a!query(
    selection: a!querySelection(
    columns: {
    /* Your column selection*/

    }
    ),
    logicalExpression: a!queryLogicalExpression(
    operator: "AND",
    filters: {
    /* Default Filter*/
    a!queryFilter(
    field: "primary Key",
    operator: "not null"
    ),
    /* Optional Filters*/if(
    rule!APN_isBlank(
    ri!selectedApple
    ),
    {},
    a!queryFilter(
    field: "apple",
    operator: "=",
    value: ri!selectedApple
    )
    ),
    if(
    rule!APN_isBlank(
    ri!selectedMango
    ),
    {},
    a!queryFilter(
    field: "mango",
    operator: "=",
    value: ri!selectedMango
    )
    )
    }
    ),
    pagingInfo: rule!APN_pagingInfoAll()
    )
    )
Reply
  • Please use below code and check if it works using single input


    a!queryEntity(
    entity: cons!RAS_MASTER_DATASET_REPORT_V,
    query: a!query(
    selection: a!querySelection(
    columns: {
    /* Your column selection*/

    }
    ),
    logicalExpression: a!queryLogicalExpression(
    operator: "AND",
    filters: {
    /* Default Filter*/
    a!queryFilter(
    field: "primary Key",
    operator: "not null"
    ),
    /* Optional Filters*/if(
    rule!APN_isBlank(
    ri!selectedApple
    ),
    {},
    a!queryFilter(
    field: "apple",
    operator: "=",
    value: ri!selectedApple
    )
    ),
    if(
    rule!APN_isBlank(
    ri!selectedMango
    ),
    {},
    a!queryFilter(
    field: "mango",
    operator: "=",
    value: ri!selectedMango
    )
    )
    }
    ),
    pagingInfo: rule!APN_pagingInfoAll()
    )
    )
Children
No Data