Radio Button Not Saving after clicking off

EDIT: Got the value to save but the dropdown box doesn't show up when the correct value (boolean true) is selected

      a!radioButtonField(
              label: "Is Jira Access Required?",
              labelPosition: "ABOVE",
              choiceLabels: {"Yes", "No"},
              choiceValues: {true, false},
              value: ri!record['recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{2463d484-b544-48a5-813c-701935313606}jiraAccess'],
              saveInto: ri!record['recordType!{d327a5dc-18d4-4ffd-8bdf-6a22b134677f}DS Contractor.fields.{2463d484-b544-48a5-813c-701935313606}jiraAccess'],
              required: true,
              choiceLayout: "COMPACT",
              validations: {}
              
            ),
            
             a!dropdownField(
              label: "Which Department Requires Access?",
              labelPosition: "ABOVE",
              placeholder: "--- Select a Value ---",
              choiceLabels: cons!DS_deptChoice1,

              choiceValues: cons!DS_deptChoice1,
              value: ri!deptChoice1,
              saveInto: ri!deptChoice1,
              
              searchDisplay: "AUTO",
              showWhen: ri!radioValues2 = true,
              required: true(),
              
              validations: {}

 - working improperly
  - working properly

  Discussion posts and replies are publicly visible

Parents Reply
  • +1
    Certified Lead Developer
    in reply to davinar9817

    One thing you should note is that if that value starts out as empty (null, as opposed to true or false), then it might do something unexpected for you: the showWhen parameter defaults to "true" (i.e. passing in a null value is the same as if you passed in nothing), so you might need to also check that in the showWhen parameter.  The easy way to do that these days is to wrap the value in a!defaultValue(), like "a!defaultValue( [record type code], false())" (meaning when the record type value resolves as "null()", the showWhen will see a value of "false" and thus stay hidden).

Children
No Data