Dropdown selection does not stay

I have set up several drop down selections and know that if you do not set the value and saveInto parameters, the value once selected does not "stick".  As soon as you move to another field, the value selected disappears.

This is a fairly simple form for uploading a document.  The user selects the Document Type and then enters the name of the document.  Once those two values are populated, the file upload is shown.  The Rule Imputs for this screen are:

  • spkrDocRecord of record type Speaker Document
  • spkrDocIsUpdate of type boolean
  • speakerRecord of record type Speaker

a!localVariables(
  
  local!spkrDocRecord: ri!spkrDocRecord,
  local!DocTypes: rule!PMSO_getDocTypeforLU(),
  local!file,
a!formLayout(
  label: if(
    ri!SpkrDocIsUpdate,
    "Update Speaker Document",
    "Upload Speaker Document"
  ),
  contents: {
    a!columnsLayout(
      columns: {
        a!columnLayout(
          contents: {
            a!dropdownField(
              /*data: 'recordType!{cd218e93-7586-48a4-a11a-f89f12464996}PMSO REF Document Type',*/
              label: "Document Type",
              labelPosition: "ABOVE",
              placeholder: "--- Select a Document Type ---",
              searchDisplay: "AUTO",
              required: true,
              choiceLabels: {local!DocTypes['recordType!{cd218e93-7586-48a4-a11a-f89f12464996}PMSO REF Document Type.fields.{a489bd89-31e1-476a-a68c-bcba37f5590c}documentType']},
              choiceValues: {local!DocTypes['recordType!{cd218e93-7586-48a4-a11a-f89f12464996}PMSO REF Document Type.fields.{c857f6f4-37b4-49ad-8ca3-a22a87b7e457}documentTypeId']},
              value: local!spkrDocRecord['recordType!{9df55e03-ef2b-4364-9658-c9bef646c7e7}PMSO Speaker Document.fields.{e1ca2a44-85c8-42cc-8c7f-7657534203f3}speakerDocumentTypeId'],
              saveInto: local!spkrDocRecord['recordType!{9df55e03-ef2b-4364-9658-c9bef646c7e7}PMSO Speaker Document.fields.{b816b085-0925-4849-9432-bb52a73dea59}speakerDocumentId'],
              validations: {}
            ),
            
            a!textField(
              label: "Document Name",
              labelPosition: "ABOVE",
              value: ri!spkrDocRecord['recordType!{9df55e03-ef2b-4364-9658-c9bef646c7e7}PMSO Speaker Document.fields.{97f18964-805d-4141-b480-e6498852de25}speakerDocument'],
              saveInto: ri!spkrDocRecord['recordType!{9df55e03-ef2b-4364-9658-c9bef646c7e7}PMSO Speaker Document.fields.{97f18964-805d-4141-b480-e6498852de25}speakerDocument'],
              characterLimit: 255,
              required: true()
            ),
            a!fileUploadField(
              label: "File Upload",
              labelPosition: "ABOVE",
              instructions: "Use this to upload speaker documents.",
              target: cons!PMSO_SpeakerDocuments,
              maxSelections: 1,
              value: local!file,
              saveInto: {
                a!save(local!file,save!value),
                a!save(local!spkrDocRecord['recordType!{9df55e03-ef2b-4364-9658-c9bef646c7e7}PMSO Speaker Document.fields.{378d31ea-cb13-4794-8520-7e58fb8cd0c3}speakerDocumentNo'], local!file[1])
              },
              showWhen: and(
                a!isNotNullOrEmpty(local!spkrDocRecord['recordType!{9df55e03-ef2b-4364-9658-c9bef646c7e7}PMSO Speaker Document.fields.{97f18964-805d-4141-b480-e6498852de25}speakerDocument']),
                a!isNotNullOrEmpty(local!spkrDocRecord['recordType!{9df55e03-ef2b-4364-9658-c9bef646c7e7}PMSO Speaker Document.fields.{e1ca2a44-85c8-42cc-8c7f-7657534203f3}speakerDocumentTypeId'])
              ),
              validations: {}
            ),
            a!integerField(
              label: "Speaker Document No",
              labelPosition: "ABOVE",
              value: ri!spkrDocRecord['recordType!{9df55e03-ef2b-4364-9658-c9bef646c7e7}PMSO Speaker Document.fields.{378d31ea-cb13-4794-8520-7e58fb8cd0c3}speakerDocumentNo'],
              saveInto: ri!spkrDocRecord['recordType!{9df55e03-ef2b-4364-9658-c9bef646c7e7}PMSO Speaker Document.fields.{378d31ea-cb13-4794-8520-7e58fb8cd0c3}speakerDocumentNo'],
              required: false,
              readOnly: true,
              showWhen: and(
                a!isNotNullOrEmpty(local!spkrDocRecord['recordType!{9df55e03-ef2b-4364-9658-c9bef646c7e7}PMSO Speaker Document.fields.{97f18964-805d-4141-b480-e6498852de25}speakerDocument']),
                a!isNotNullOrEmpty(local!spkrDocRecord['recordType!{9df55e03-ef2b-4364-9658-c9bef646c7e7}PMSO Speaker Document.fields.{e1ca2a44-85c8-42cc-8c7f-7657534203f3}speakerDocumentTypeId'])
              ),
            )
          }
        ),
        a!columnLayout(
          contents: {}
        )
      }
    )
  },
  buttons: a!buttonLayout(
    primaryButtons: {
      a!buttonWidget(
        label: if(ri!SpkrDocIsUpdate, "Save", "Create"),
        saveInto: {
          a!save(ri!spkrDocCUAction,"Save"),
          a!save(ri!spkrDocRecord,local!spkrDocRecord)
        },
        submit: true,
        style: "SOLID",
        validate: true
      )
    },
    secondaryButtons: {
      a!buttonWidget(
        label: "Cancel",
        value: true,
        saveInto: a!save(ri!spkrDocCUAction,"Cancel"),
        submit: true,
        style: "OUTLINE",
        validate: false
      )
    }
  )
)
)

The weird thing is that even though the value in the dropdown disappears, the value is set in local variable local!spkrDocRecord.

 

  Discussion posts and replies are publicly visible