Skip to main content
swapnar6405
February 22, 2023
Question

Issue while converting value to upper case

  • February 22, 2023
  • 6 replies
  • 0 views

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)
        )
      )
    )
  }
)

6 replies

davel001150
February 22, 2023

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.

swapnar6405
February 22, 2023

Same is the issue even if I remove upper() function in the value. Whatever I am entering is disappearing.

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

davel001150
February 22, 2023

I was just fixing my post as you replied.  You need to update the saveInto, as specified above.