How to Validate whether value inserted in textbox using Set text is correct or not

Hello,

I want to validate the RichTextBox value update correctly or not using Set Text activity. The Value is in Variable. If the value is not correctly updated how to retry to update that value with 3 attempt. Using Retry Scope is not supportrd.

Below is the screenshot of my flow, but if I go with this it might go in Infinite loop.

image

@nilesh.mahajan Along with what you have Implemented you can also Set a Counter variable.

And in the Condition, you can use :
Not (CheckNetQty = Net_Quantity) and counter < 3
Go to First Step
Else
Go to Next Step

You should Initialise the Counter at the beginning, then After Get Text you would need to use an Assign Activity to Increment the Counter in the below way :
counter = counter +1

thnx for reply. Will it directly throw Exception if this condition failed

@nilesh.mahajan Exception on the Condition will not be thrown :sweat_smile: The exception will either be before the Condition or after the Condition. Do you want to handle Exceptions or do you want to check if the Text that you have typed in the text box is equal to the actual value that should be typed ?

I want to check if the Text that typed in the text box is equal to the actual value that should be typed. this is the main aim. but my worry is even trying 3 times if it is not updated correctly as per actualy value then what will happened.
Actually I am not in favor to validate each updated value. but while testing found that set text value is not correctly updated.
Please advice if there is any best practice to update the value correctly in one attempt to reduce this validation.

@nilesh.mahajan Why do you use Set Text ? Have you tried Type Into Activity? And can you give an example of How the data may change?

Hi @nilesh.mahajan
I tried to enter the value in a text box and get the entered value back from it. Instead of get text you can use “Get Attribute” actiity.

I used it and found the accurate result.

You need to check for the property Explorer to check which attribute is giving correct value in your case. In my case “value” attribute gives me the correct result.

You can try this method to get the value, for comparison you can use do while loop.

Hope it will solve your requirement.

Regards,
Atul Rai

I dont have live example now, But i was used Type into activity to insert one file path. and while updating that into system some time only half of the path was updated. even for date updation someting it was update only year or sometime only month. :grinning:.

Below properties I have set for type into.

Hence now I am replacing all Type Into activity with Set text activity. and plan to remove all the validation after updating value with confidence that Set text activity will work correctly.

@nilesh.mahajan Ok. But Set Text also gives out that error ?

That I have’t check yet. I have used set focused activity before used set text activity and puted 500 miliseconds at both places in DelayAfter property.

@nilesh.mahajan I’m not sure why Type Into does that sometimes, even I have faced it, but handling the Properties had made it work properly as I remember. Let me know if the Set Text Activity works properly in your case. Also What field are you trying to type into ?

what is the properties you set for Type Into, so that instead replacing set text in entire project i can apply that property in my code for type into.
I am inputing in type into sometime alphabets, dates or numbers like below mentioned just below headers.

@nilesh.mahajan I have not altered with Send Window Messages as it was not necessary, I have used Click Before Typing, With Activate Disabled and Empty Field Checked. However I do not know if it will work in your case. Are you typing into the Excel Cells or is it some application field?

Maybe handling the Selector can correct the problem?

I am typing the excel cells value into our ERP application.

@nilesh.mahajan Ok. Yes I think I remember, mostly because the System is very fast, The Type Into Activity tries to type the value but it can’t cope up to the System Speed and hence, Sometimes the Type Into types only half of the value. It might be better to add delays in this case.

Why not? I use this activity in such scenario.

Cheers

Also I found that Wait for Complete property is not wait till that perticular activity complete the action.

Even If i give delay, but every time application ERP response time is different so found difficulties there. :grinning:

Which activity you used in checking the equal to condition

It is “Is equal string” activity
image

from Workflow Manager Activities pack
image

Cheers