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
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.
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) ) ) ) })
I was just fixing my post as you replied. You need to update the saveInto, as specified above.
Is this a right away. Not sure. Any comments from experts.
a!localVariables( { a!columnsLayout( columns: a!columnLayout( contents: a!textField( label: "Name:", value: ri!name, saveInto: a!save( ri!name, upper(save!value) ) ) ) ) })
It does indeed look correct...have you not tested it to establish that is does work? That's by far the best way of knowing...
I have tested and it is working. But, requesting experts advise if this is the correct way of doing.