Unable to save local variable to rule input

a!localVariables(

  local!doctorsList:rule!HM_getDoctor(department: ri!requestedDept),

  a!columnsLayout(

    columns: {

      a!columnLayout(

        contents: {

          a!sectionLayout(

            label: "Appointment",

            contents: {

              a!dropdownField(

                label: "Department",

                labelPosition: "ABOVE",

                placeholder: "--- Select a Value ---",

                choiceLabels:{"Gynecologist","Pediatrician","Psychiatrist","General Surgeon","Cardiac Surgeon"},

                choiceValues:{"Gynecologist","Pediatrician","Psychiatrist","General Surgeon","Cardiac Surgeon"},

                value:ri!requestedDept,

                saveInto: {ri!requestedDept},

                searchDisplay: "AUTO",

                validations: {}

              )

            }

          ),

          a!sectionLayout(

            label: "List of Doctors",

            contents: {

              a!columnsLayout(

                columns: {

                  a!columnLayout(

                    contents: {

                      a!textField(

                        label: "Doctor Name",

                        labelPosition: "ADJACENT",

                        value: local!doctorsList.doctorName,

                        saveInto: ri!docName,

                        readOnly: true()

                      ),

                      a!textField(

                        label: "Doctor Dept",

                        labelPosition: "ADJACENT",

                        value: local!doctorsList.doctorDept,

                        saveInto: ri!docDept,

                        readOnly: true()

                      ),

                      a!dateField(

                        label: "Doctor Visit",

                        labelPosition: "ADJACENT",

                        value: local!doctorsList.doctorVisit,

                        saveInto: ri!docVisit,

                        readOnly: true()

                      )

                    }

                  )

                }

              )

            }

          ),

          a!sectionLayout(

            label: "",

            contents: {

              a!columnsLayout(

                columns: {

                  a!columnLayout(

                    contents: {

                      a!buttonArrayLayout(

                        buttons: {

                          a!buttonWidget(

                            label: "Cancel",

                            value: true,

                            saveInto: ri!cancel,

                            submit: true,

                            style: "NORMAL",

                            validate: false

                          )

                        },

                        align: "START"

                      )

                    }

                  ),

                  a!columnLayout(

                    contents: {

                      a!buttonArrayLayout(

                        buttons: {

                          a!buttonWidget(

                            label: "Submit",

                            submit: true,

                            style: "PRIMARY"

                          )

                        },

                        align: "END"

                      )

                    }

                  )

                }

              )

            }

          )

        }

      )

    }

  )

)

I am trying to save local!doctorsList.doctorName to ri!docName, local!doctorsList.doctor.doctorDept to ri!docDept and local!doctorsList.doctorVisit to ri!docVisit. However nothing is being saved into the rule inputs. I am able to display the value of the local variables so i'm assuming there is some problem with the way i'm trying to assign the value to the rule inputs. Any help is deeply appreciated.

  Discussion posts and replies are publicly visible