Control Flow in UiPath Studio 1.2

  Рет қаралды 177,465

UiPath

8 жыл бұрын

Control-flow is the process of defining the rules and automatic decisions your workflow will take, through the use of if/else decisions, loops, and so on.
In this video, we're going to use the IF-else decision in both the flowchart mode and the sequence mode.
Using these conditions, we’ll make a workflow that checks if a certain year is Leap Year or not. It does that by testing if the specific year is a multiple of 4.
Solution: There are a few options but the easiest solution is the use of modulus operator.
It works by giving us the remainder of a division operation. So if the remainder of a number is a 0, this means it's a leap year.
Also, we’ll be adding a couple of message-boxes for the True and False situations in case our conditions has met or not.
Using Loops
Loops are structures used to automate repetitive tasks.
In our flowchart, if we want to start the process again when we haven't found a leap year, we’ll just connect the end of this branch of the workflow, to where we want the execution to resume.
Do While vs For Each
It's pretty clear that the while and doWhile loops are almost the same thing. They work by repeating the set of actions in the {body} while the {condition} is true.
The only difference between the two is the order in which the 2 elements are executed.
For the While loop, if the condition is met, the set of actions in the body are executed.
For the Do/While loop, the actions are executed and then, if the condition is met, the actions are executed again.
The ForEach loop is a bit different. It works by iterating through a list of items, one item at a time, and executing whatever actions are in the {Body} of the action.
Remember the use of the correct variable when dealing with different data types. We will show you the common ways you can do to prevent errors in using different variable types.
www.uipath.com/guides/about-control-flow

Пікірлер: 22
@Uhkyjgy
@Uhkyjgy 7 жыл бұрын
very nice and useful for beginners
@utkarshtripathi9118
@utkarshtripathi9118 3 жыл бұрын
kzbin.info/aero/PLgFzPB3dmhEoJVCYvC44tr45zPR-cqNfK
@juniorfumi7860
@juniorfumi7860 7 жыл бұрын
00:00 - Introduction 00:26 - Control Flow 06:55 - Loops 12:37 - Guessing Game
@LauraBroder
@LauraBroder 8 жыл бұрын
When I created my solution (almost identical to yours!) I set both "random" and "guess" variables to the type Integer. That created validation errors (which were a little hard to interpret). Changing them both back to Generic resolved the problem. Why?
@robertinolo
@robertinolo 8 жыл бұрын
Hello, The "Input Dialog" activity returrns a string and while you're trying to save the string into a integer variable this is not possible and that's why you have validations errors. The generic value type is able to recognize if the data that you're trying to store into the variable is a string or an integer and that's why it works with generic value and not with integer, as the type of the variable. Hope this helped :D
@jacoblin1
@jacoblin1 7 жыл бұрын
at 5:38 you create a variable by right clicking in the output field, when I does this I get an compiler error. When I create the variable from the variables tab it works fine. I use version 2016. 2.6204
@UiPath
@UiPath 7 жыл бұрын
Hi, thanks for getting in touch, could you please report this on the forum: www.forum.uipath.com
@vvssekhar6723
@vvssekhar6723 6 жыл бұрын
Hi, your videos are really interesting and easy to understand. Could you please send me a link which has all your series in a sequential manner?
@haric2728
@haric2728 6 жыл бұрын
If you didn't find it kzbin.info/aero/PLG3LgE4atuv-4zpRk-ZhAHq1z9lXTHsbG
@rukikar5643
@rukikar5643 7 жыл бұрын
What's the type are your variables? Each time I am getting error in my input. It says "One or more children as validation errors or warnings". I was getting same error when we create basic leap year test. When I don't use right click it worked. But for the guessing game it doesn't work.
@tchrapko
@tchrapko 5 жыл бұрын
Children shouldn't be used as a form of validation. A person should, ideally, be secure in themselves as an adult before having children. However, one can certainly argue that raising a good/successful child into an adult that inspires pride will result in a sense of validation of one's self as a parent. This may not answer your specific question.
@davids2338
@davids2338 4 жыл бұрын
Hope you were able to solve the problem in 3 years, but others might face the same problem (as I also just did). Here what I had to do to makes it run. First of all: Change the variable Random from String to Int32. Then: On the 2 Flow decision activities when you enter Guess = Random and Guess < Random replace them respectively by Guess = Random.ToString and Guess < Random.ToString
@ZaBeenz
@ZaBeenz 7 жыл бұрын
Hi there, I have created almost the exact same solution as you have differences being: I used a variable called GuessText (in place of hint) for the 2nd decision (guess bigger, guess smaller) which gets placed into the users guess box (set the default of the guesttext to "Guess the number") and I have limited the random numbers between 0 and 100). My issue is when testing the solution, typing in 100 tells me to enter a higher number, this also occurs up to e.g. 449. i also tested it when it is random between 0 and 1000 and i still get the same problem (when choosing a number that is greater than the limit). This doesn't make any sense to me since if the number being entered is higher than the limit, it should always indicate to select a smaller number. Could you please explain why this is happening?
@narcissus2011b
@narcissus2011b 6 жыл бұрын
I have the same issue, not sure why. I entered 4 and it says bigger, and then I entered 5 it says less... this will keep happening several times...
@abdulahimohamed7083
@abdulahimohamed7083 7 жыл бұрын
Hi, At 9:40 you create a do while loop to repeat the sequence if the condition is not met, but for some reason the loop is not repeating the sequence, when I enter values that are not a leap year. could you please assist ?
@utkarshtripathi9118
@utkarshtripathi9118 3 жыл бұрын
kzbin.info/aero/PLgFzPB3dmhEoJVCYvC44tr45zPR-cqNfK
@nithinrajashekaraa7623
@nithinrajashekaraa7623 4 жыл бұрын
Main.xaml: Compiler error(s) encountered processing expression "Directory.GetFiles(SelectedFiles)". 'SelectedFiles' is not declared. It may be inaccessible due to its protection level. Whats the solution for this error?
@utkarshtripathi9118
@utkarshtripathi9118 3 жыл бұрын
kzbin.info/aero/PLgFzPB3dmhEoJVCYvC44tr45zPR-cqNfK
@jurpik35
@jurpik35 6 жыл бұрын
I hope robot arms will be free
@SadSadDeadM
@SadSadDeadM 6 жыл бұрын
System.Activities.InvalidWorkflowException: The workflow has validation errors. Review and resolve them first. ---> System.Activities.ValidationException: Compiler error(s) encountered processing expression "hint". Value of type 'UiPath.Core.GenericValue' cannot be converted to '1-dimensional array of String'. How do I solve this? I followed your steps exactly the same :(
@SadSadDeadM
@SadSadDeadM 6 жыл бұрын
When I change the "hint" to be "String" i get error that 'String' cannot be converted to '1-dimensional array of String'.
@yourdailyinspirationshorts
@yourdailyinspirationshorts 7 жыл бұрын
For what it is worth, this is the incorrect way to identify a leap year. Years that are divisible by 100, but not by 400 (i.e. 1700, 1800, 1900) are not leap years. Considering the next instance of this is in 2100 its probably safe to use this an example...
Jumping off balcony pulls her tooth! 🫣🦷
01:00
Justin Flom
Рет қаралды 21 МЛН
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 88 МЛН
Little girl's dream of a giant teddy bear is about to come true #shorts
00:32
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 15 МЛН
Looks very comfortable. #leddisplay #ledscreen #ledwall #eagerled
0:19
LED Screen Factory-EagerLED
Рет қаралды 7 МЛН
Какой ноутбук взять для учёбы? #msi #rtx4090 #laptop #юмор #игровой #apple #shorts
0:18
Как бесплатно замутить iphone 15 pro max
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 8 МЛН
$1 vs $100,000 Slow Motion Camera!
0:44
Hafu Go
Рет қаралды 28 МЛН
low battery 🪫
0:10
dednahype
Рет қаралды 1,4 МЛН