RPA Challenge in Power Automate for Desktop (Selectors)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
let's solve the rpa challenge in microsoft power automate for desktop you will learn to do advanced browser automation select the work and working with data from excel let's get started so you go to rpa challenge.com this will give you this page first we will need to download the data so go down here and click download excel this will download an excel sheet and let me do this drag it over here here and i place the excel sheet on my desktop i make it easy accessible but you can place your excel sheet whenever you want so i double-click and open it this is my data so we have seven columns first name last name company name roland company address email and phone number the first row is a header and then we have the data records so we have one record here that is john smith and company name blah blah blah then we have jane albert michael and so forth the rpa challenges let me show you again at the rpa challenge.com page is that before each one of the rows needs to fill in the data here for example john and i don't need to write the other things so i write the other things and then i click submit then the next one that could be jane and of course her data click submit and we will do it for each one of these rows so we click submit 10 times with all the data and you can see the challenge here that is that the fields are moving this mimics of course this is extreme but this mimics a challenge that we face as rpa developers so we will solve that this is all about getting 100 accuracy that means that we get the right data in each one of these fields and we get it as fast as possible later on we will speed hack it so to say so i'll show you a much faster solution and i'll teach you about how we can reuse coding blocks but let's get started our first task is to go to power automate for desktop and create a new flow so i click new flow here i will call mine rpa challenge demo and click create this will open up a brand new microsoft power automate for desktop canvas here it is so this is our blank robot the first mission that is to read this excel sheet so let me close it down and i'll go grab the path so i minimize all these and then i shift right click on the file i repeat shift right click on the file copy as path then i go back to my workflow the first thing that we'll do is to launch excel so i'll find a launch excel and drag it in this one will open up my excel book and launch excel so instead of launching excel with blank document i'll open the following document here i can paste in the path i could also have clicked the select file and found it if i wanted that way so i paste it in here remember to move the quotation marks so we'll do like this make instance visible do we want to have excel open each time our robot runs and then close it down when the robot finished there's no really need for that will not change the data in this excel sheet we will only read from it and then we will type it into the browser so i'll untick this we can also open it as read only because we will only read from it we will not need to edit anything so i can just open this read only then i click save so right now we open an excel sheet one feature or should i call it an annoying feature in power automate for desktop is that if we don't close our excel sheets in the robot flow then it will get locked for editing for future as long as we haven't rebooted or forced killed it so i'll find a close excel like this and drag it in here i will just just close the excel instance variable and let me just i click save here let me just show you how this got created up here in the launch excel we created a variable called excel instance that is we open this excel sheet here and save the instance in excel instance so that is the one we're using down here when we're closing it we are not saving anything because we don't edit the document we cannot since it's read-only but we don't need to so i click save so right now we're just launching and then we're closing again let me just open the excel sheet again and talk about the strategy in power automate for desktop when we read range we will say start from a1 i'll show you in a bit and then we'll need to figure out where we want to read so we can see it we want to read to here that is here so we need to tell power automate for desktop where our data end that is the end column and the end row we will use an action called get first free row and column that will give us this row here and this column since this is the first free with no data in and this row here is the first tree with no data and the technique here the trick is that we can just minus one from this then we'll end up here we can minus one from here then we'll end here and we will read the exact range let me show you so i close down this again and go back to my workflow so as i said i'll find a get first free column in row so i'll find a get first free column row here and drag it in it's important that we drag it in between the launch and close so do that this will do nothing but reading from the excel instance that was this one up here and produce two variables so these are numbers that is the first three column and the first three row we can click save let's test our workflow by clicking run so i'm launching excel i'll get the first free row column from the excel worksheet and then i'm closing it and if we go over here we can clearly see that something is wrong that is the first three column is number nine and then the first three row will be a thousand and one what happened well let's open the excel sheet and look another time this is a very important exercise so we'll see that we need proper data quality when we feed our robot the issue here is that the first three column is nine so one two three four five six seven eight nine it says and that is because this column here you can see that it's wider than the other three ones here so probably some data used to be in here and that's why it's reading that the first three column is number nine out here this is not a problem here since we really don't need to use it but it will be a problem that we have 1001 rows so the way we'll fix it is that you'll go over here to 12 click it press ctrl shift and down arrow that'll mark it now you go right click click delete this will delete the rows we don't really need to delete you can do it if you want it's not necessary so we'll click save again then we'll close the excel sheet now let's try to run it so i click run and see if i have fixed the first free row issue there you go the first three row is now number 12 and let me open up the excel sheet again that is right you can see here the first free row is indeed number 12. so i'll close it now we will read the excel sheet with a read from excel worksheet so read from excel worksheet drag it in underneath the get first free column enroll we will read the excel instance fine then we want to retrieve not the value of a single cell but value from a range of cells so pick that one start column well that was a that is fine start row that is one then the end column i will just read the first three column i haven't fixed it it's not really an issue we'll just read a blank column but if you have fixed it you will have eight here but we will use the variable so this is the variable that is called the first three column and this have a value in it so if i click the x here then i'll pick the first three column since this is the first three column i will say minus one that's where my data is similarly in the end row i'll click the x here first tree row and then i'll go inside it and say minus one so i'll pick the row right before the first tree row that is where my data is open up advanced i always recommend you doing so tick the first line of range contains column names like this that is we have headers your sword first name last name company name blah blah blah that's right if i scroll a little bit down you can see that the variables produced is excel data this is a data table so if i click save here let's test the workflow again so i click run there you go now we can go over here and inspect the excel data variable so if i double click over here there you go we have our data we have this first free column out here or it's not really the first three column but it's a column with nothing in that's fine we will not use it but it was very important that we limited their actual data rows down here so there is our last one one thing to notice as well is that you can see the type is data table that's fine and then there's these numbers this is the number of the data row and these ones are zero indexed that means that the first one is zero then one two three four five that is a common way to represent data in programming that we have the first item as zero then one two three it can be a little bit confusing because in excel it's one but you know what it is this is not something that we'll need in this exercise but it's nice to know for future use so then i click close now we can open up a browser so we read the data correct and let me just maximize this go to our challenge which is here so the challenge now is that we read the data then we want to click start we'll wait a bit with that we'll just practice here but what we will do is that for each row we will fill in the right fields so for example first name last name so fourth let's solve that so i go back to power automate desktop and then find a launch chrome i will take chrome you can feel free to take the microsoft edge or firefox as long as you don't take the internet explorer that one is outdated be sure to have installed the browser extension of your preferred browser that you want to use we did that in the first lesson where we installed power automate for desktop if you forgot how we did it just click the video up here in the right corner and come back to this video afterwards now drag in a launch new chrome in the beginning of the workflow so here we will just open up the browser we will launch a new instance and then we'll choose a url the url we want to open is this rpa challenge so i'll copy this one here go back to power automate for desktop and paste in the url this browser will be referred to as browser this is a variable for the browser so i'll click save so now we just open up the chrome to iterate through each one of these excel data rows over here so we want to first take the john then fill in the data here then take jane and so forth we'll find a for each here and drag in the for each right after the excel read from excel worksheet so value to iterate we want to iterate our data table called excel data so click the x here double click the excel data that one will choose it so each one of the rows will be taken one by one and we will call that cue and row for cue and item feel free to change it i'll just leave it with cue an item that is fine for now then i'll click save so we'll iterate through each one of the rows of the excel data and now we can do something to it and let's just pick the first name first so i'll go here and then i'll fill in the first name i want to do it and let me open up my example data again here so i want to take from this column i want to take john then i want to check jane and so forth so the column name that is called first name i'll copy this one here then i will go back to power automate for desktop now i'll find a populate text field so search for populate text field pick the one that says on web page not this one here so web form filling populate text field drag it in inside the for each it's very important where you drag and drop your activities because this will be the order that our robot will perform them in so we will be using our browser instance that is fine then we will have our ui element so if i click the drop down here i can add the ui element this will open up this now i just need to have my browser open where my rpa challenges and you can see that i can select different parts of the browsers this is the ui elements that is like text like fields buttons i can even select things that nothing we can do really nothing in but there's still elements in this browser i want to target the first name so if i go over here press ctrl n left click with the mouse that one will create a ui element of the first name now i just need to say what do i want to type in well i want to type something in from the cue and item that is the cue and row that we are taking so first will be the first row then the second and so fourth to target that one click the x here and then find the queue an item that's it this one will take the whole row the entire row so i only want the first name that one will be the first column so i do this i'll say hot brackets then i'll say single quotation marks i'll paste in my first name single quotation marks and hard bracket end so this is the correct text we'll still need to do a little operation with ui element but i will show you so when i click save here i can find the ui element that i created that was the first name field i can find it by clicking this stack off it looks like papers over here so if i click here we can see that it gave the ui element a very weird name this is actually the ui element that we're using over here so the first thing that we can do is that we can hover our mohs mouse over here either press f2 or right click rename i will rename it to first name field already rename your ui elements so that we can easily identify them click enter then i will just have a submit because first we will see that this solution works and then we will fix all the other fields and hint this will not work but we'll learn how to deal with it that is the part of this challenge so if i search for a click here i'll pick the click link and web page because after each filling in we need to click to submit so after we filled all these in we will just do the first name first but then we'll click the submit submit submit and so forth so i want to find the submit button so if i go back here i'll add a new ui element which is the submit button so click this drop down add ui element find the submit button you can see it here press the control button left click with your mouse we have now created the submit button i'll click save this one got a little bit better name but i like to rename the things it is best practice imagine that you come back or even worse your colleague come back to this robot and want to maintain it then it would be hard if we haven't done proper naming so always name your ui elements and also your variables and activity as well so i'll choose rename again and here i'll say submit button like this now let's test the workflow so if i just close this one down here and then i run it we open up the rpa challenge we read the excel data and now we have a problem this one will not work and this is part of the challenge we need to fix it and let's see what what's happened so if i go back here so we got an arrow here we couldn't find the first field you can see that this arrow here gave us an arrow that the selective for this idea was not found it's also stating down here and then the robot stops right here so let's go fix it so click the ui elements out here now we need to inspect the first name field because that was this one so if i open the first name field and then i double click it again here i have my selector it's called input id equals something we can either build up the selector tree here or as i recommend we'll learn to do it manually you will grow as an rpa developer and it's very very easy let's first talk about why this was wrong and that is i go back to my browser with the rpa challenge again let's pick this one here and to inspect elements on the web page and let me just maximize it so we can really see it i can either right click and then click inspect or i can press f12 i repeat f12 this will open up the developer console if your developer console opens up like this here over here i recommend that you put it in the bottom of your browser it's not necessary but it's the sign for that you'll have an easier time reading it to do so click the three dots here and click dark to the button that is this one here that will move it down here to inspect the first name field click this arrow here and find the first name field that is here and if i left click with the mouse you can see that this is the address the css address for the first name this id here that is what we used so we use the input and then we'll take this idea but let me show you if i click submit once more then this changes and let me select the first name field again now the id changes but so we need to find another property that works better and hint we have one check this ng reflect name label first name because let me just go click submit again let me select the first name that one is here this one is static this one doesn't change so if i just click here copy it over to my power automate for desktop and if we want to edit this manually untick this custom here and go in here we will still use the input so inside the hard brackets delete everything and we can just mark it and then paste it in so have it like this ctrl v now we paste it in the ng reflect name equals first name so we updated the selector of the first name field i click ok the arrow disappears this doesn't mean that this will work but it will i'll promise you but it just mean that we updated it and powered made for desktop will not have the arrow we can still have an error when we run so let's go test it so if i close here and just let me close all the browser windows of the old rpa challenges so we don't get it mixed up so i'll close this one as well and then we will run the robot so we're reading the excel sheet and now let's see if we can now we can type in john and we'll we have come to the next mistake because now we can find the submit button we will do exactly like before because now we can write in a name so now we just need to fix the submit button and again we do exactly like before so click the ui elements up here double click to submit and here we can see the address double click once more and this is a very very long address so this is not working let's fix it so we go back again we press f12 or we can do just to hover our mouse over right click and choose inspect so here we have the submit button and we are using a very long selector so let's see what we can use instead so i recommend that we take the input that is fine but instead of selecting a lot of things here we can just have either the type or the value i'll just choose the value here we have no other buttons with the value submit if we had we had a problem we need to specify it further but we will just choose this and let's go back and fix the selector again untick the custom mark everything and paste in your new selector now we just need the input around so i'll do this i'll say input then hard bracket start here and hard bracket end here this input is let me go back to the rp8 challenge this input is this input here and then we have the value submit we could also use the type submit instead but let's try to run i'll close down this browser window again so we make sure that we have it so now i click update now i have also updated the value for the submit button that was another challenge this exercise is so good i really hope you do it with me if you like this video please give it a thumbs up that will really help me a lot thank you so now we're filling in the first name it works we can fill in every first name and click submit then the rest of this exercise this is just the hard work because now we've figured out what we are doing we get the idea and we have a plan now we just need to do a little bit of manual work and here i just need to find out which order we are typing these in so first i know we have the first name then last name so let me go open the excel sheet so now we want the last name and then the company name let's go fix it so i open up this power automate for desktop flow again so we need six other public text field on web pages since we need to fill in the other fields so let's go search for one so populate text field on web page we could also do a trick which i will show you in two seconds but i'll drag this one in underneath we will do exactly like before so i will click this drop down here and then i will add a new a ui element for the last name so i will click here and i need to go over to my browser so i find that then just click the last name do like this press ctrl n and click it we have created a ui element we know this doesn't work but now we have it and in the text we will use this q an item first name and here we can actually do a trick instead of writing out the column headers we can just use 0 1 2 3 as the column letters so a will be zero it's zero indexed again b will be one so that is the first name that will be zero then last name will be one let me show you so again pick you an item up here and then inside here just have a hard bracket and then just say one this one will be the second column that is the last name like this and we can click save similarly we can go up here and instead of the first name i will just have the zero this is a much easier approach it's also a little bit more unstable because say that someone from the business side of our company suddenly changed the order of the columns then we'll have a problem but we'll also have a problem if they rename it that one we will avoid here so it's just a matter of making sure that the business size business side of the company doesn't make any mistakes let's stick with this we'll just need to fix this because here we can see we have o q e view j and that one originates in if i go here i right click i inspect here you can see that we have o q e v that is this idea but we know that we will use the ng reflect name so let's go copy that that will be called a label last name then we'll go to power automate for desktop again go out to ui elements and double click this one here and here we will double click again and untick the custom here and instead of this idea we will mark it and then paste in the ng reflect name called label last name and click update that's it so let's just see that this works and if this works we know that we can just create all other elements like that just rename it over here so right click rename you'll be happy about that so this one will be the last name field like that we can run the robot let me just close down the rpa challenge and run it here we will open up the browser we will read excel and in a few seconds so now we can fill in the first name and last name can you see it let's just run all 10 rows and let's see if we get a good time and if we get 100 accuracy then i will just do the rest of them without running the robot i really hope that you will stick to the end here because we have a lot of other things to learn in power automate for desktop that's it and we actually haven't got a time because we need to click start here before we get a time so that's fine we're just practicing but we can see that it works let's go back and fix the rest so we need five more and i think the easiest thing would be to create ui elements first and then just use these ones here let me show you so i'll click here and i can add ui elements from here and i can also add them from actions like we used to but i'll click here so now after the last name let me go to my excel sheet so i'll go here i need the company name so if i go back to my browser here here we have the company name i press ctrl then click with the mouse we have created a ui element we can actually create more ui elements so now i will have the role in company i'm not really sure what i clicked here so i will have the rolling company and then the address so if i go back so here i'll have the rolling company then i will have the address like this you can see that we got created it's a bit of a mess because we have a hard time telling which one of these but i know this one is the first one so if i go back then i need email and then phone number so if i go back here email ctrl and left click like this and then first number so now i've created five ui elements in a row i'll click done i know that these ones are wrong because we will need to update them with the right selector so let us go back here we need to update the company name first so right click click inspect this one will be called ng reflect name label company name so i copy it over here this is a fantastic exercise you learn how to work with selectors and figure out that is very very easy so now i will update the selector so go open it then i double click it untick custom and do like this we now have it right i'll click update and i click close so you'll also see that it doesn't really matter which order we had them in because now we're just updating each one one by one and if we do proper renaming like this say company name field like this they will be very hard very easy to create afterward over here let's just fix the next one the next one that was rolling company so if i go back to my browser here and then just click this arrow role in company that one is this one ng reflect name label role i go back to power automate for desktop open up the selector double click it again untick the custom and inside here i'll just do this like this ng reflect name label roll so it's not like this selector type always work it's just a bit of try and arrow and you'll get re really really good at it when you practice these things and you'll be able to see what works and will not even without testing so then i click save then i can click close here and now i can rename this so right click again i'll say roll in company like this then we will have the address so that one will be this one so back to the browser we have the address here so i click the arrow click the address that one will be ng reflect name label address go copy that one back to power automate for desktop then open up the selector double click it again click this custom here and paste it in just as before if you want to get good at these selectors there is a training called css diner i put a link to it below and this will be a very nice place to practice but for now let's solve the ipa challenge then i click update then i click close and again i'll rename this i'll rename this to address field and we can also add in the fields here and the role company doesn't really matter but it looks nice so we have them in the same syntax now i just need email and phone number i think it was that oral yep email and phone number back to the browser then find the email here i can still actually if i haven't clicked this one i can also still right click inspect that one will get me to the email it's just i think it's two sides of the same case what you think is easiest click the arrow or right click inspect i usually just click the arrow but let's go back here now open this one here open this one click the custom and paste in our selector like this then i'll click update i click close so this one was the email field so right click and do this rename say email field like this finally we have the phone so i go back here the phone that one is here now let's try the inspect have the label phone here copy it back to power automate for desktop double click it double click it untick the custom paste it in here like that so now we created each one of the ui elements i do this i just right click rename the last one that one will be the phone field like this now i just need to drag in five more public text field on web page so i have one here so let us just have that is the queue in item two that would be the third column and that will be the company name now it's nice that i did them in order so first name last name company name so i can click this drop down and now i can find it here so that will be the company name and again i go down here i'll take the q an item and we are at the two that is the third column so hard brackets two do like this and then click save that's it now drag in another one now it will be rolling company so i click the drop down click the rolling company again q an item and we add number three so i do this and click save now we need the address so i drag in another public text field scroll a little bit down choose the address now pick the queue an item again again this is quite static work you know what to be done we're just going to fix it so we'll make it work that's it that was now we just need the email and the phone similarly so i find the email field that was this one cue an item and again i'm at number five so i do like this click save and finally we have the last one that will be the phone field so i'll create it again cue an item and that one will be six i'm so bad at remembering numbers so if any of you have any technique to remember numbers just let me know in the comments i'll be very happy but then i'll click save so here i've created all my text field i even click submit after each one of these rounds we still need to click the start button but let's just test that it actually works then we can easily implement the start button as well if all these things works so if i click run let's just see that we actually type in so it's john smith it solution analyst address email phone number click submit and it looks like this works so we can now type in and let me speed up the rest and let's just fix the start button that's it our robot now ran now we can just do the start button and see if we have any problem there so we only need to click the start once and then we'll fill in the fields so the start button will be just before the for each so we just need another click link on web page so i'll click it and drag it in here we'll have the ui element and then i will add the ui element and i will find the start button here and i click control and click it so now we have the start button and then i'll click save so if i go back to my ui elements i can start by renaming it so i click rename and here i'll say start button again we might have to fix it so if i run my data once more i'll open up reading the excel and it appears that we need to fix the start button as well i really love this exercise we are getting through so much of the rpa developer struggles but you'll learn a lot so i go here so here we're using this ui element which is probably wrong or it is so if i close it i go over to ui elements i click the start button and here you can see a long address again that is usually not really nice and here we can have some we can see something called type submit but let's inspect what we'll use we know that we'll go inside the custom editor so untick this one and go back to the browser and let's fix it so we need the start button it's not the submit button this time so again i can right click inspect and let me just drag this in so we can see it and i think we can use the button and then class and take this class here so if i do this then i go back to power automate for desktop and i will delete all this i still need a button but let me just because that one was this button here so if i go back again i'll say button then hard brackets oh sorry not sure what i press there and that is with these live builds but i have to do like this then paste in the class equals wave effect hard brackets in let's see if this will not work so now i updated the start button as well let me close down the rpa challenge windows it will not make a mistake it will still do the actions in the right browser but it's just quite convenient to see that it works so now we need to click the start button now we click the start button you can see that we are in round one we are actually filling in all the fields we're clicking submit now we can just do all these 10 rounds and then we will see that it works so i'll speed it up and we'll meet after round 10. that's it we finished the rba challenge and we succeeded we have a success rate of one hundred percent we did it in 67 000 milliseconds that is 67 68 seconds we can do this faster so let's try to solve the rpa channels even faster this one is not something i want to do in real life development because we have like forced breaks inside small breaks inside these activities that make sure that the page gets loaded correctly but since this is a challenge and we want to do it as fast as possible we will open up these activities so open up the click link gun web page then go to advanced untick this wait for page to load and then click save similarly open up the public text field on web page here we will untick the emulate typing we'll go down to advanced and again wait for page to load untick so now we'll perform it whether or not the page has load this one in real life production this will could cause some problems because then we'll just start typing whether or not the page has loaded but that's fine for this exercise do the same thing with each one of these you can pause the video because i will do it quite fast so emulate typing and then wait for page do it for each one of these here like this this this is this this and finally click link on web page advanced wait for page load click save another thing we can either run it here that is in the debugger then we can have the run delay down to one like this that is milliseconds between each actions and we have quite a few because here we have one two three four five six seven eight so that one will actually be almost the second one for each one of these for each but we can also run it you can try to run it out here you can just start any flow by clicking the play button we will run it from in here so we will have the one here let's try to run it again and let me close down this and see if we can run it any faster so we're still reading the excel then we click start now you can see we have really really fast much faster than before we are actually at 100 percent and we had four seconds so quite an improvement i actually got it down to around two seconds when i haven't right now i'm having a video recording software on you can see it down here that interferes a bit with the ui so that'll be a bit slower but we can get it down to two seconds let me know your time in the comments even if you're slower that's fine just put in your time in the comments now let's go back to the solution you can see that these ones are quite redundant we have seven one of each one of them and they almost look the same the selector that looks a little bit different you can remember we created over here and you can see this q and item 0 1 2 3 4 5 6. so let's try to fix it i open up a notepad here i have notepad notepad plus plus this is a fantastic tool for developing so if you're coder you should download this one this is free it's just to take notes so you can take notes in any document we want so i just want all the selectors and i want to store them in a list so to create a list variable in power to made for desktop i just do like these percentages signs and then i'll have a hard bracket and then in the end i'll have a hard bracket end and a percentage signs the all the spaces that doesn't matter it just makes it much more easy to read and then inside here i have my items in single quotation marks so let's find them i can either find them in the browser or i can find them here the first one that was the first name field so i go in here and i know i need the nd reflect name and then i can just pick in this label first name or i can actually just do the first name but that's just for convenience pick the whole property that is the label first name so i'll copy that one from here then i can just click cancel and close go back to my notepad plus then paste it in then another single quotation marks that is the first item in my list then it's comma separated so now i can pick in the next one that one be the last name i will do this and then copy in the label last name like this so what we're doing here is that we're creating a dynamic solutions solution i really want you to do this we will just do the same with each one of the selectors it doesn't sound like much but if you can understand this concept and you can make it work you have really improved as an rpa developer then i do this that was the company name enrolling company open that one here sorry label roll here close it that one will be this one here do this then open address here so we will have each one of them in a list so now i just need email and a phone like this so in single quotation marks we have like this and then we will have the phone so now if i remember to just take this not do the same manual mistake over and over paste it in here so now we have a list of our selectors you can create it in power to make port desktop but since i was paid copying all the selectors in i created here in a notepad document it doesn't have to be notepad plus plus it could be word or a notepad i just prefer notepad plus plus so now i have this list so mark it and then copy it then go back to powertrain wait for desktop so in the end in the beginning we'll have a set variable so we'll create our list so i'll do this by going here i will call it selector values so in the variable name say selector values do like this you can just overwrite the percentage assigned power automate for desktop will automatically create it now i just pasted in my list here we have created a list we can now iterate through them for each one of our records and then we can use it dynamically so we'll only use one activity so i find if an another for each so now we will iterate through each one of these selected values i'll drag it in here so here i will have the it the value to iterate that will be to select the values so go find it here do like this now i will not call it q an item i will call it select a value so i'll say for each select a value that will be each one of these values in select a value so i'll do like this i'll also introduce a variable that will start with zero and then in the end of this we will add one turn this one we will use for the one zero two 3 it will look like this so i'll find a set variable again drag it in in the first for each that's very important you can call this one counter give it the value of 0 because we'll use it zero here so i'll do like this so now we have it here then we will add one to it for each one of these selector values that's so we can target each one of these fields so i will have another set variable now we'll just add one to it even though you don't understand it please create the solution that will help you understand a very advanced concept it's okay it's not expected that you understand this but it's expected that you at least try i should practice my english you can hear that but let's click the x and let's find the counter again that's here and to add one to the counter just go inside the percentages sign and click plus one and click save now we just need one populate text field and one selector so let's first create a dynamic selector and let's pick the first name field so i just start by renaming it to dynamic field this one will make will make it work for each one of these fields so i do like this double click it and let's just talk about what we want so what we want is simply just we want this label first name to change by the value of this selector value because that is this one so first it will be labeled first name then this one then label last name let me show you mark it you can delete it so you can see that it's gone or you can just click this variable up here and have the selector value so now we're using a variable we're using the value of this variable to put inside this selector so it will be first be this this this this then we'll click update so now we have the dynamic field we will delete these in a few seconds you can see that it updated up here so let's drag it in drag it in inside the beginning of the inner for each that is the selected value select the values here so now we will target each one of the fields so what we need to fix it's simply just to fix this zero we will change that with the value of the counter so open up this one here delete this and click the x sorry here find the counter that is this one we just need to delete the percentages sign here because we have a variable in the variable like this so we'll have the q an item and then we use the counter it's first zero then it's one last name and when it's one we'll have the one that one will be this one and we will have the label last name label company name then we'll use the two because the counter has increased once more then i click save so now and then we will just delete all of these so mark them shift from the end or you can just click in one by one mark them then click delete so now our workflow got really easy we can even delete all of these so i'll delete the phone field delete the email field delete the address field you don't need to do it but i like to clean up always make that a good habit so now we only have three ui elements we have a dynamic selector a submit and a start this one i warn you this one will be a little bit slow i just closed down the rba challenge but that's okay it's better practice this is the correct way to use it so we make reusable components let us see if that works it will as i said it will be a little bit slower but it will still be okay so here we have it at six seconds so we missed two seconds but we created a much more nicer solution click the video on the screen to get to the next lesson
Info
Channel: Anders Jensen
Views: 19,497
Rating: undefined out of 5
Keywords: rpa challenge, rpa challenge power automate desktop, rpa challenges, anders jensen, selectors in power automate desktop, dynamic selectors in power automate desktop, power automate for desktop, rpa challenge power automate, solve rpa challenge, rpa challenge power automate solution, advanced power automate desktop use case, power automate desktop tutorial, power automate desktop web automation, power automate guide, power automate desktop, rpachallenge
Id: JbXunbF_Nbo
Channel Id: undefined
Length: 50min 23sec (3023 seconds)
Published: Wed May 11 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.