- Sivaprakash BKR
- PowerBuilder
- Monday, 22 July 2024 12:31 PM UTC
Hello,
Using Pb 2022 R3 build 3356
One of the user wants to convert the input characters to a string field either to uppercase or wordcap based on the option given in a setup window.
Say, if the setupoption is set to UPPER, means
the input value of string field has to be converted to uppercase.
If Platinum or platinum has been entered it has to be converted to PLATINUM.
Else if the setup option is to set Wordcap mans,
the input value of the string field has to be converted to wordcap,
If PLATINUM PIECE or platinum piece has been entered to has to be converted to Platinum Piece.
I tried with the following code in the itemchanged event;
String ls_data
ls_data = Data
If option = 'upper' Then
SetText(ls_data)
ElseIf option = 'Wordcap' Then
ls_data = lo_string.of_wordcap(ls_data)
SetText(ls_data)
End If
Return 1 <= Without this Return value doesn't change, but the focus remains in the input field.
The above code works, but the control remains in the respective input field. So we have to tab out twice to move out of that field.
Removing Return 1 doesn't modify the value to converted value, but control moves to the next input field.
Is there any way to accomplish the above, without tabbing twice from the corresponding input field?
Happiness Always
BKR Sivaprakash
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.