Hi Team, I have one usecase like I need to find how many space there in text using UiPath apps itself textbox
Hi @Buvaneshwaran_R ,
Yes, we can
You can create a box to fill text in
then get that text
→ we can get space in that text
System.Text.RegularExpressions.Regex.Replace(yourStringVar,“\s{2,}”," ")
or
regards,
Hi Nguyen,
I mean I need to find in UiPath apps not using UiPath studio
I think logic to get no. of character is similar
we can get text in box as argument
Open your UiPath Apps project and create a new custom component.
Design the user interface for your component. This should include a textbox where the user can enter the text, and a button to trigger the count.
Add a Textbox widget and a Button widget to your UI. Configure the Textbox to accept user input and the Button to trigger the action.
You can create variables to store and manipulate data. Create a variable of type String
to store the text from the Textbox and another variable of type Int32
to store the count of spaces.
Create two actions:
An action to capture the text from the Textbox and store it in the string variable.
An action to count the spaces in the string and store the count in the integer variable.
Implement the Actions:
For the first action (capturing the text), use the “Get Text” action associated with the Textbox widget. Store the result in the string variable.
For the second action (counting spaces), use a custom action where you implement a simple logic to count the spaces in the string
cheers…!
Hello @Buvaneshwaran_R ,
Please Use Len(characters). this will return length of characters.
E.g - LEN(“Arvind”).ToString