I want to handle an automation that cv get text is in while loop , i want to check if cv get text value is same as a previous value ,if it’s same then it should come out of loop
Check if cv get text value is same as another value then the loop should break
Have a global variable before the loop as prev_value.
and if current cv_get_text = Prev_value in while loop then Break.
@Priyanka_Ramesh i dont understand can u plz ellaborate more
as shown in the image i have to check if cv get text value is already present in datatable or not if its then come out of loop
Keep and Assign as prev_value in front of while loop.
check if prev_value = str_text (cv value)
if not same assign the value
prev_value = str_text
else same ,
you mean something like this?
or you want to check the value of the same activity but in the previus loop to compare with the current loop?
@fernando_zuluaga yes I want to check the value of the same activity but in the previous loop to compare with the current loop
@Priyanka_Ramesh but here prev value is also in the same activity… i want to check the value of the same get text activity value but in the previous loop to compare with the current loop
@fernando_zuluaga in the first iteration how in the right side of assign cvvalue will come ? Bcse at the first time when loop come to assign cvvalue is nothing right …as in the image .cv get text place after assign …Could u plz tell?
it will start the loop, and assing a null value to the valueToCompare because it will be first iteration so the value to compare is not necesary, then when it start the next iteration will assing the value that the cv activity gets in the previous iteration to the valueToCompare variable, then it will get a new value, so basically the valueToCompare is saving the previous value and comparing with the cvValue which is the current value
@fernando_zuluaga in my while activity there is no such option as output in properties
so where i declared the output
Just leave the if condition without the index variable validation, just keep the compare of those 2 variables, it will work without that
@fernando_zuluaga its giving error in the if condition