How to force selection of a specific answer in a dropdown field within an editable grid

Certified Associate Developer

Hi team

I'm needing some help to force an answer in a dropdown field where a given answer is selected in another dropdown field.

 Here is a screenshot of the editable grid.

I want to force "not used" in the "how important" column when "never" is selected  in the "how often" column

The software names are returned from an existing table.

This is how the answer table is set up:

Answer Table
id Name questionID
1 Daily 1
2 Weekly 1
3 Monthly 1
4 Quarterly 1
5 Annually 1
6 Never 1
7 Vital 2
8 Important 2
9 Useful 2
10 Not Useful 2
11 Not Used 2

The questionId corresponds to the two column headings.

Here's the expression for teh editable grid:

{
/* For the Software Title Column*/
a!richTextDisplayField(
value: a!richTextItem(
text: fv!item.softwareID.name,
color: "ACCENT",
size: "MEDIUM",
style: "STRONG"
)
),
/* For the Frequency Of Use and Vitality Columns*/
a!forEach(
items: fv!item.surveyResultUserResponse,
expression: a!dropdownField(
placeholder: "Select",
choiceLabels: fv!item.question.allowedAnswer.name,
choiceValues: fv!item.question.allowedAnswer.name,
value: fv!item.answer,
saveInto: { fv!item.answer },
required: true
)
)

I'm stumped!

I would greatly appreciate answers with sample expressions, please

Thanks

Stephen

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data