Question
radio button
a!gridLayout(
labelPosition: "COLLAPSED",
headerCells: {
a!gridLayoutHeaderCell(
label: cons!CR_APP_LAB_STAND_VS_NONSTANDARD_FIELDS[2]
),
a!gridLayoutHeaderCell(
label: cons!CR_APP_LAB_STAND_VS_NONSTANDARD_FIELDS[3],
align: "CENTER"
),
a!gridLayoutHeaderCell(
label: cons!CR_APP_LAB_STAND_VS_NONSTANDARD_FIELDS[4],
align: "CENTER"
),
a!gridLayoutHeaderCell(
label: cons!CR_APP_LAB_STAND_VS_NONSTANDARD_FIELDS[5]
)
},
columnConfigs: {
a!gridLayoutColumnConfig(weight: 5),
a!gridLayoutColumnConfig(weight: "NARROW"),
a!gridLayoutColumnConfig(weight: "NARROW"),
a!gridLayoutColumnConfig(weight: 8)
},
rows: {
a!forEach(
items: ri!crAppStandVsNonStand_cdt,
expression: a!localVariables(
local!choiceValue,
local!SingleREFStandardVsNonStand_cdt: index(
ri!crRefStandVsNonStand_cdt,
wherecontains(
fv!item.questionId_int,
tointeger(
ri!crRefStandVsNonStand_cdt.questionId_int
)
),
{}
),
a!gridRowLayout(
contents: {
a!textField(
readOnly: true,
value: fv!item.question_txt
),
a!richTextDisplayField(
align: "CENTER",
value: a!richTextIcon(
linkStyle: "STANDALONE",
caption: rule!CR_APP_Guidelines_Mapping(
questions: trim(split(fv!item.question_txt, ".").[2])
),
icon: "question-circle",
color: "ACCENT"
)
),
a!radioButtonField(
labelPosition: "COLLAPSED",
choiceLayout: "COMPACT",
disabled: ri!buttonAction_txt <> cons!CR_APP_TXT_STAND_VS_NONSTAND_EDIT,
choiceLabels: cons!CR_APP_TXT_CHOICE_LABELS_YES_NO,
choiceValues: touniformstring(cons!CR_APP_INT_CHOICE_VALUES),
value: fv!item.answer_txt,
saveInto: {
fv!item.answer_txt,
a!save(local!choiceValue, save!value),
if(
isnull(fv!item.id_int),
{},
{
a!save(fv!item.updatedBy_txt, loggedInUser()),
a!save(fv!item.updatedOn_dt, now()),
a!save(
fv!item.updatedByRole_txt,
rule!CR_FN_getUserRole(inputUser_txt: loggedInUser())
)
}
),
a!save(
ri!crAppStandVsNonStand_cdt,
a!forEach(
items: ri!crAppStandVsNonStand_cdt,
expression: if(
local!SingleREFStandardVsNonStand_cdt.dependentQuestion_int = fv!item.questionId_int,
rule!NBF_COMMON_updateDictionary(
dictionary: fv!item,
fieldsAndValues: {
answer_txt: if(
local!choiceValue = cons!CR_APP_INT_CHOICE_VALUES[1],
cons!CR_APP_INT_CHOICE_VALUES[2],
cons!CR_APP_INT_CHOICE_VALUES[1]
)
}
),
fv!item
)
)
)
},
required: index(
local!SingleREFStandardVsNonStand_cdt,
"required_int",
{}
)
),
a!paragraphField(
readOnly: ri!buttonAction_txt <> cons!CR_APP_TXT_STAND_VS_NONSTAND_EDIT,
value: fv!item.comment_txt,
saveInto: {
fv!item.comment_txt,
if(
isnull(fv!item.id_int),
{},
{
a!save(fv!item.updatedBy_txt, loggedInUser()),
a!save(fv!item.updatedOn_dt, now()),
a!save(
fv!item.updatedByRole_txt,
rule!CR_FN_getUserRole(inputUser_txt: loggedInUser())
)
}
)
},
placeholder: if(
like(
fv!item.question_txt,
"*" & cons!CR_APP_STANDARD_NONSTANDARD_TRANSACTIONS[7]
),
cons!CR_TXT_PLACEHOLDER_VALUE[2],
cons!CR_TXT_PLACEHOLDER_VALUE[1]
),
required: fv!item.answer_txt,
validations: rule!CR_FN_setMaximumCharactersValidation(comments_txt: fv!item.comment_txt)
)
}
)
)
)
},
selectionSaveInto: {},
validationGroup: "CHECKLIST",
shadeAlternateRows: true
)
here in radio button for 17th and 18th question i have written like if we select 17 Q as yes then 18 wiill auto select to No and vise versa
now i have to change the code if i select no for 17th Q if we select NO then 18th Q can be selected as NO along with the above code as well
can anyone help me with this?

