Issue while converting value to upper case

Hi,

I am trying to convert the text which is entering into the textField into a upper case and trying to store into a ruleInput.

But, it is not working as expected. I am attaching the code here to get some experts advise. Thanks.

a!localVariables(
  {
    a!columnsLayout(
      columns: a!columnLayout(
        contents: a!textField(
          label: "Name:",
          value: upper(ri!name),
          saveInto: upper(ri!name)
        )
      )
    )
  }
)

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    remove the upper function from the value: parameter, and it should stay lower case until you focus on another component, or at least lose focus on your textField.  At that point, it should suddenly go full caps and be stored as such in the variable.

    Now I see, you're trying to pass the value into the upper() function, rather than trying to pass it to a variable.  Your saveInto: should read : 

    saveInto:  a!save(ri!name, upper(save!value)) 

    Now you're doing stuff in the right order, upper-ing the value as you save it to the variable.

Reply
  • 0
    Certified Lead Developer

    remove the upper function from the value: parameter, and it should stay lower case until you focus on another component, or at least lose focus on your textField.  At that point, it should suddenly go full caps and be stored as such in the variable.

    Now I see, you're trying to pass the value into the upper() function, rather than trying to pass it to a variable.  Your saveInto: should read : 

    saveInto:  a!save(ri!name, upper(save!value)) 

    Now you're doing stuff in the right order, upper-ing the value as you save it to the variable.

Children