Increment a String with condition

In a system,

I want to put a user reference number which is 12 digits. Suppose the number is 141921050001

Now, in the system database, if the number is already entered then I want to try with 141921050001.01 and if that also exists then I would go for 141921050001.02 and so on which is a for-loop.

My loop will come to an end when the number is not duplicate.

How can I perform this for loop by adding .01,.02,.03, and so on as per my requirement?

How about you multiply every by 100 and then use a simple loop.

EG check for 14192195000100, ten try 14192195000101, 14192195000102

Naah, I need it in this format.

This is a requirement from the user end. Which is a dot and incremental number 01,02,03 etc

Hi,

How about the following sample?

Regards,

1 Like

The conversion to 100 should be within the code. Any output to the user can be divided back

@Yoichi

This is working. Thank you.

1 Like

@Yoichi

But this is writing all of the values till 100 on the system but I want that it will try .1 first then process for the next steps, if the element exist is still appeared then it will go for .2 and so on

how can I do this?

Hi,

Nope. If there isn’t the data in system, it flows else part and break the loop.
We need to set some activity to check the data exists or not, instead of comment activity.

Regards,

I am picking data from excel

Hi,

Can you elaborate with sample, if possible? It’s no problem even if dummy data.

Regards,

I can allow me a few minutes

@Yoichi

image

If this message box(consider it as element exist) appear then I have to click the button OK

then

image
I have to iterate this number to the next value which is XXXXXXXXXXXX.03

then I have to try again to input it in the system.

Finally when the input will be unique string this box will show up
image

I want to break the iteration at this point and move for the further stage.

At this point I can perform the iteration but struggling with the LOOP part.

Is this understandable?

@Yoichi

Hi,

Thank you for sharing detailed information. If my understanding is right, it will be as the following. (it’s just a mock sample)
Hope this helps you.

Sample20210518-2.zip (4.2 KB)

Regards,

@Yoichi your help is alright but maybe I cant explain my problem to you properly

@Yoichi

Demo.zip (3.6 MB)

Here I have shown the work I want to perform by rpa

Hi,

Thank you for sharing video.
Although I might not understand your problem correctly, I wrote a mock sample as the following.
Does this fit for you?

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.