Skip to main content
February 23, 2022
Question

wherecontains not returning the value

  • February 23, 2022
  • 7 replies
  • 1 view

Hi Team,

I have a dropdown field in which once user selects the value, based on it the grid below displays the result. 

a!dropdownField(
label: "",
labelPosition: "",
placeholder: "Years Available",
choiceLabels: local!years,
choiceValues: local!years,
value: local!selectedYear,
saveInto: {
local!selectedYear,
a!save(ri!selectedYear, local!selectedYear),
a!save(local!GridData,
wherecontains(tointeger(local!selectedYear),
tointeger(index(ri!engagement,"clientYearEnd",null())))
),
a!save(local!selectedIndex, null),
a!save(ri!selectedEngagements, null),
a!save(local!data, null)
}
)

The local!GridData is used in the data parameter of the gridField but here it is not getting any value. Can anyone please suggest what needs to be done?

Thanks

7 replies

richardm900458
February 23, 2022

Hello ananditab,
1.) is ri!engagement null or empty?
2.)is the value selectYear within the array of  "client years"?

February 23, 2022

1.) ri!engagement is not empty. Its holds a dictionary.

2.) yes the value is within the array of "client years"

stefanhelzle0001
Brainy
February 23, 2022

What is the intended output? wherecontains() gives you the indexes of values in a list.

richardm900458
February 23, 2022

valid point. local!Griddata shouln't be an index usually