Hi,
I have an Quote id which contains digits “123456789” now my bot needs to identify whether the numbers are consecutive or repetitive
Can anyone help me i will truly appreciate their efforts
Thanks in advance
Hi,
I have an Quote id which contains digits “123456789” now my bot needs to identify whether the numbers are consecutive or repetitive
Can anyone help me i will truly appreciate their efforts
Thanks in advance
currentDigit
).isRepetitive
) to True.isConsecutive
) to True.isRepetitive
and isConsecutive
and display the appropriate message using a Message Box or Write Line activity.Can you define what you mean by “consecutive” and “repetitive”, and give examples of input with desired output?
That’s not the same thing. That Regex just matches if there are 3 or more digits next to each other. This post here is asking about if the numbers are in order.
Google is always a good place to start. Here is a comprehensive discussion and code examples for this kind of logic.
Hi @rsr.chandu
To determine if the numbers in the Quote ID are consecutive, you can use the following logic:
a. Convert the Quote ID to an array of characters: Use the quoteId.ToCharArray()
method to convert the quoteId
variable into an array of characters.
b. Iterate over the array: Use a For Each activity to iterate over each character in the array.
c. Check for consecutive digits: Within the loop, compare each digit with the next digit to check if they are consecutive. You can use the Ascii code of the characters to perform the comparison.
Thanks!