I have this table, i grouped asset as DictList if Document No. and Sheet Number are same in each row by using this LINQ (From row In dt_checkin.AsEnumerable()
Group row By key = row(“Document No.”).ToString.Trim + “,” + row(“Sheet Number”).ToString.Trim + “,” + row(“Document Name”).ToString.Trim + “,” + row(“Checkout Comments”).ToString.Trim
Into grp = Group
Select key, AssetsList = grp.Select(Function(r) r(“Asset Number”).ToString).ToList()
).ToDictionary(Function(x) x.key, Function(x) x.AssetsList)
then i need to read for each Value of the current key “Document No. , Sheet Number ,Document Name and Checkout Comments” and do some step in web application then for each asset add in web application for the current key after adding all asset for the current key then go to the next key and do same step
how can i develop this scenario?
@Balqees_Almamari If you want to automate this scenario in UiPath you can try this simple way to do it:
-
Group your data first Take your Excel or Csv data and group it by Document No, Sheet Number, Document Name, and Checkout Comments.
For each group collect all the related Asset Numbers together. Think of each group as one “document entry” with its list of assets.
-
Process one group at a time go through each group one by one. Extract the Document Number, Sheet Number, Document Name, and Checkout Comments from the group key so you know what to fill in.
-
Fill in the web application and Use the extracted information to fill the corresponding fields in the web app.
-
Add all assets for that document and Loop through the list of assets for that group. Enter each asset in the app and click Add or whatever button is require.
-
Submit or save it once all assets for the current document are added submit or save the entry.
-
Repeat for the next document Move on to the next group and repeat the same steps until all documents and their assets are processed.
@Balqees_Almamari To do this loop through the dictionary using a for each activity. Each item in the dictionary has .key your all document info and . value list of assets.
then split the key to get individuals fields Use assign activity like parts = currentItem.Key.Split(","c)
docNo = parts(0)
sheetNo = parts(1)
docName = parts(2)
checkoutComments = parts(3)
so, now you use these variables in your web automation steps.