toUpperCase in Workflow code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
toUpperCase in Workflow code
Version: Windchill 12.1
Use Case: Due to contains being case sensitive, I need to change a string variable to UPPER CASE
Description:
How do you program in a workflow to make a string variable UPPER CASE in a new variable? I cannot get toUpperCase to work. Any insights would be appreciated.
Solved! Go to Solution.
- Labels:
-
Change_Mgmt
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @BrianToussaint , you are looking to display the variable in upper case or are you looking to save the variable to upper case? Let's see what you have for this variable. Transition code might be an option. toUpperCase() creates a new String for its return which would leave the original String unaffected. If you are looking to change the value, you might have to write it back to itself:
stringVariable=stringVariable.toUpperCase();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @BrianToussaint,
Thank you for reaching out with your question.
To assist you better, could you please provide more details and context regarding your inquiry? Specifically:
- Which specific workflow are you working on in Windchill 12.1?
- Can you share the snippet of code where you're trying to use toUpperCase?
- Are you encountering any error messages or unexpected behavior when using toUpperCase?
- Have you tried logging the intermediate steps to see where the issue might be occurring?
Including screenshots can also be very helpful in understanding your process. This will enhance the likelihood of receiving valuable assistance from other Community members.
You might also find it useful to refer to the guide on how to ask a good question. Additionally, our community champion has shared tips on key points to include when asking a question on the PTC Community.
I hope this information is helpful.
Best Regards,
Vivek N
Community Moderation Team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @BrianToussaint , you are looking to display the variable in upper case or are you looking to save the variable to upper case? Let's see what you have for this variable. Transition code might be an option. toUpperCase() creates a new String for its return which would leave the original String unaffected. If you are looking to change the value, you might have to write it back to itself:
stringVariable=stringVariable.toUpperCase();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
