Saving Local Variable to Rule Input After If Statement

Hey gang, I have the following code:

load(
  local!mobileManager: cons!TECH_RELEASEMGMT_USERS_MOBILE_MANAGER,
  local!mobileEngineerAN: cons!TECH_RELEASEMGMT_USERS_LEAD_MOBILE_ENGINEER_ANDROID,
  local!mobileEngineerIP: cons!TECH_RELEASEMGMT_USERS_LEAD_MOBILE_ENGINEER_IPHONE,
  local!mobileEngineerBB: cons!TECH_RELEASEMGMT_USERS_LEAD_MOBILE_ENGINEER_BLACKBERRY,
  local!leadMobileEngineer,
  local!currentStep: 1,
  local!steps: {"Step 1", "Confirmation"},
  /*Step: Confirmation = 2*/
  a!formLayout(
    label: "Mobile Info",
    contents: {
      a!milestoneField(
        steps: local!steps,
        active: local!currentStep
      ),
      a!radioButtonField(
        label: "Mobile Platform",
        labelPosition: "ADJACENT",
        choiceLabels: cons!TECH_RELEASEMGMT_MOBILE_PLATFORMS,
        choiceValues: cons!TECH_RELEASEMGMT_MOBILE_PLATFORMS,
        value: ri!mobilePlatform,
        saveInto: ri!mobilePlatform,
        choiceLayout: "STACKED",
        showWhen: local!currentStep = 1,
        validations: {}
      ),
      a!textField(
        label: "Mobile Platform",
        labelPosition: "ADJACENT",
        value: ri!mobilePlatform,
        saveInto: ri!mobilePlatform,
        readOnly: true,
        required: local!currentStep = 2,
        showWhen: local!currentStep > 1
      ),
      a!textField(
        label: "Mobile Program Manager",
        labelPosition: "ADJACENT",
        value: local!mobileManager,
        saveInto: local!mobileManager,
        required: local!currentStep = 2,
        readOnly: local!currentStep > 1,
        validations: {}
      ),
      a!textField(
        label: "Lead Mobile Engineer",
        labelPosition: "ADJACENT",
        value: if(
          ri!mobilePlatform = "",
          "--- Select Mobile Platform ---",
          if(
            ri!mobilePlatform = "iOS",
            local!mobileEngineerIP,
            if(
              ri!mobilePlatform = "Android",
              local!mobileEngineerAN,
              local!mobileEngineerBB
            )
          )
        ),
        readOnly: local!currentStep > 1,
        required: local!currentStep = 2,
        saveInto: local!leadMobileEngineer,
        validations: {}
      )
    },
    buttons: a!buttonLayout(
      primaryButtons: {
        a!buttonWidget(
          label: "Next",
          style: "PRIMARY",
          value: local!currentStep +1,
          saveInto: local!currentStep,
          showWhen: local!currentStep <> 2
        ),
        a!buttonWidgetSubmit(
          label: "Submit",
          style: "PRIMARY",
          showWhen: local!currentStep = 2,
          saveInto: {
            a!save(
              target: ri!mobileManger,
              value: local!mobileManager
            ),
            a!save(
              target: ri!leadMobileEngineer,
              value: local!leadMobileEngineer
            )
          }
        )
      },
      secondaryButtons: {
        a!buttonWidget(
          label: "Go Back",
          value: local!currentStep - 1,
          saveInto: local!currentStep,
          showWhen: local!currentStep > 1
        )
        }
    )
  )
)

I'm trying to save local!leadMobileEngineer to ri!leadMobileEngineer. However, nothing is getting saved to the local variable. So, I'm assuming, after the If Statement, the code for the saveInto parameter is not being evaluated. I'm wondering how can I get that parameter to be evaluated without having to interact with the textField or having to use a User Picker? Any help is appreciated.

  Discussion posts and replies are publicly visible

Parents Reply Children