Repeat number of times string not working

“You never learned any other programming language, have you? Never seen…”

You’re really full of crap! I’ve learned HTML, CSS, and JavaScript in-depth dear and they’re completely different programming languages from RPA. It doesn’t always mean that if I know another programming language, I should also be familiar with another one. They can be totally different and nothing similar in between. I don’t know why you make me feel like I know nothing and you’re the intelligent one.

Let me create my own complicated programming language and throw it up to your face without any documentation whatsoever and tell you like you’re telling me “THAT’S BASIC STUFF” Lol. Perhaps then I’ll laugh at you in the same way. Let me give you another example smart guy.

I speak 3 languages. English, Arabic, and French. If I’m assuming you don’t read, write, or speak Arabic, then I should laugh at you as well and tell you “Oh, why don’t you know the word Mar7aba!” Everybody knows it. So if you don’t know it, that means you’re a dumbass.

You see, that’s the exact same thing you’re trying to frame me for, make me look like I should know something that everybody should obviously know, but that’s not true. What might sound easy for someone might not be so easy for someone else.

The fact is that everybody can decide to learn if they choose to and if they’re committed to learning, and I’m also getting to learn RPA. However, due to a lack of proper documentation and unofficial support coming only from the community, I truly don’t have a lot of options.

You offered a solution and I rejected it because after comparing the For Each activity method against the Repeat Number of Times activity method, I still preferred the latter because it’s simply much faster and more convenient than the one you proposed. If you feel offended by that, then I suggest you do NOT reply back.

Regards,
Private Matter

HTML and CSS aren’t really programming languages. They’re XML style code to control layout.

Javascript is a programming language and it contains all the same kinds of programming logic like For loops, etc.

Because those are standard logic control operations that have existed in programming languages for decades.

And you have experienced people trying to teach you, and reject their teaching.

Gents,
makes no sense to attack each other. It doesn’t bring any good to this community.

The fact is that UiPath documentation is … a bit brief :frowning:

On the other hand the RNoT activity is standard FOR loop construct well known in other languages - including Javascript - so asking why the CurrentItem counter must be numeric and can not be text is a bit … silly :frowning:

Cheers

2 Likes

@J0ska I’m not asking to replace the CurrentItem counter to have an only option as a string. What I’m asking for is to have a field next to the cases 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 have a text field for easier identification of what the bot is expected to loop. You can say it’s just like a label or a tag next to the digits. When you’re working on a project and you have lots of cases, distinguishing each by their numbers is not ideal in the least bit. If you check above in my current project, I have names like Copywriting, Graphic Design, Social Media Marketing, etc…

If I want to modify anything such as edit an activity or add new ones, I can easily see which case to expand. Luckily for me, I found that if you set the sequence name to whatever name I want, it will display on the right side of the cases.

That is why I was asking in my initial post if it’s possible to have string variable cases inside a Repeat number of times activity. The documentation provides no clue whatsoever to the user if that is applicable or not.

As for you @postwick, you’re simply stubborn and arrogant. You think your ways are God-made but they’re not. I decide what suits me and what doesn’t. It’s not for you to decide how I build my scripts. For the last time, I tell you this, I reject your so-called solution using the For Each.

I feel like this discussion went off track, and thus I want to remind you that we are here to help each other. Arguments like the one above are not achieving anything other than antagonizing each other. It does not fit our Community values and in extreme cases will force us to take an action. Thank you for understanding.

Now, to the core of this topic. @private_matter - could you please mock-up how you would see your problem being solved as an activity in Studio? It can be in Paint, or any other visual mock-up. Would it actually be a new activity, or maybe an improvement to the existing one? Does naming the sequence inside of the cases sufficiently resolve it for you?

It might actually be best if you could provide even more context about your automation, such as the problem you are trying to solve. It feels like you could benefit from storing your input variables in a config file. Maybe an Excel file, with a column for the string and a column for the number of retires). You could then create your code dynamically with only ever needing to edit the config file to change the parameters of your execution.

In general, we are on the lookout for Citizen Developer experiences that would simplify the developing experience with less code, and a visual mock-up would help us understand what would make your life easier.

2 Likes

This requirement was not clear from the initial post and it is not in line with the post subject. I believe we can agree that the “not working RNoT” activity is the well know FOR loop and therefore it works as expected. The problem I can see in the weak documentation.

This is the easiest way how to achieve your real requirement → to set a describtion to numeric “case” value. It doesn’t require any “number to text” substitution proposed by @postwick and is easy for maintenance. BTW I do it in the same way

I already solved my problem without anybody’s help. The case is closed. There’s nothing more to talk about. I only asked a simple question to see if the RNOT activity can hold a string variable as the documentation provides absolutely no information on that. Again when this guy proposed a solution, I saw what he meant but didn’t find it quite pleasing for my needs as it required lots of input, and thus I declined his offer. The For Each and RNOT activities both achieve the same result, but one has better advantages than the other.

In RNOT you can start from a particular case such as 5 and above without needing to sort whereas in For Each this doesn’t work.
In RNOT, you can repeat any sequence by instantly choosing a number such as repeating 20 times, and if I want to loop a switch case several times, I can simply add another RNOT inside the case. Whereas with For each, if I want to repeat a particular switch case several times, I’ll have to create dictionaries and assign keys to each string variable. Or I choose to input the string arrays in this way.

Ex: {“Copyrighting”, “Copyrighting”, “Copyrighting”, "Graphic Design, “Graphic Design”, “Graphic Design”, “Social Media Marketing”, “Social Media Marketing”, “Social Media Marketing”, etc…}

What if I have 50 cases, does that sound so easy to do?

Another feature that is not that good in UiPath is the sorting of the cases.

Take a look at my current project’s sorting

2022-06-08_171007

As you can see, they look like they’re randomly sorted because i’m building my website’s navigation menu and many times I have to change the order positioning of the nav, add new items, and delete ones. If there were sorting buttons like the Multiple Assign activity, it would have been much easier to instantly do these things.

And by the way, we need a feature as well on the forum to have blocking options coz this guy has tried to make a mockery out of me. I will absolutely not tolerate this kind of attitude-behavior towards me, that is why I have the right to respond. If I’m the creator of the question, I should be able to choose who can answer me and who can’t. That’s called privacy.

Now imagine a year from now someone else has to fix a problem with the automation. How easy is it going to be for them to figure out what you’re doing there with the RNOT and Switch?

The solution I posted is easy to figure out. Is yours?

As MULTIPLE people have told you there is NO point to sorting cases. It doesn’t change ANYTHING about what the Switch does. The only reason you’re worried about sorting them is because you want them in numerical order even though this number thing you’re doing is a poor solution.

Experienced people have given you the best solution. You reject it. Why?

You really are out of this world. You don’t seem to properly grasp what I try to say. You’re saying there’s “there is NO point to sorting cases. It doesn’t change ANYTHING about what the Switch does.”

How in the world is sorting not needed? What does this string array tell you {“3”,“5”,“8”,“1”,“23”,“12”,“15”,“17”,“23”}(CurrentItem)

THAT IS PURE SORTING USING 100% RAW TEXT! You really need to read properly what I write before you comment blindly.

And that string of array sorting is only using Int32 numerical digits. That is easy to do. But what if worse than that I was using a string or array with names instead of numbers and I have 100 cases that need to be sorted. That would be even more time-consuming.

If I have a navigation menu of 50+ items with sub navigations and I need to change their positions, that will look something like the below:

{“Consulting”, “Customer Service”, “Human Resources”, “Cleaning”, “Gardeners”, “Janitors”, “Mechanics”, “Construction”, “Carpentry”, “Electricians”, “Plumbing”, “Death Care”, “Coroners”, “Funeral Homes”, “Dispute Resolution”, “Arbitration”, “Courts of Law”, “Diplomacy”, “Incarceration”, “Law Enforcement”, “Lawyers”, “Mediation”, “Military”, “Negotiation”, “Education”, “Library”, “Museum”, “School”, “Entertainment”, “Gambling”, “Movie Theaters” etc…

That’s surely not a one-line of code, that’s a paragraph of code!

Now imagine you want to change the main and sub-navigation items’ positions for the above. If you enjoy cutting and pasting each word in order to change its sorting position, then I don’t because that’s the opposite of efficiency.

So don’t try to convince me that sorting using drag n drop now is not needed.