Skip to main content
Known Participant
Feb 23, 2022 4:14 PM UTC
Question

wherecontains not returning the value

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
Inspiring
Feb 23, 2022 4:22 PM UTC

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

Known Participant
Feb 23, 2022 4:51 PM UTC

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

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

stefanhelzle0001
Brainy
Feb 23, 2022 4:22 PM UTC

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

richardm900458
Inspiring
Feb 23, 2022 4:23 PM UTC

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