Hi every one i need to add the some numbers to the accounts in a web application but for some accounts we have to add 5 numbers like 2434345,324324,234324,7892,2554565 and for some accounts 3 numbers like 87904,3489387,3434 so to add the each number we need to type the number in the text box and should click add button to add second number we should again type number in text box and click add button so the loop should automatically go to next column of same row and should add the number until the column is empty so how to loop this it should go automatically to the next column and add the number if column is empty should come out of the loop and should go for next step
you can add this to array 2434345,324324,234324,7892,2554565 delimited by comma
and use Foreach Activities to iterate in the array.
hi @pattyricarte the numbers are not constant and same it changes for 10 to 20 also so it would be better to check the column and repeat the loop until next column is empty as my view
@bpt.teja1996If I understand correctly, the adding of the number is dependent on the number of rows the data exists in the application. Please send the screen shot of the application for clear understanding.
- Extract data from the application into a datatable and loop through each row to add numbers.
In the current approach, on clicking add button, the control is automatically going to the next column.
- Once the control reached to next column, Use hot key, Ctrl+A to select the value.
- Use Copy Selected Text activity to copy the value into a variable. (say variable name as CopiedValue)
- Check is value exists, not String.IsNullOrEmpty(CopiedValue), Proceed adding the value
- Otherwise end the process.
Hope this helps.
Hi @Madhavi can you please provide any example flow i was new to UI path
@bpt.teja1996 The process depends on your application behavior. Can you please try following the steps. And send the workflow after that. Will review and correct the errors.
Hi @Madhavi how to write the expression in if loop to check weather the next column in empty
if(not String.IsNullOrEmpty(CopiedValue)) => column is not empty
CopiedValue here is the variable to which you have assigned the value copied from the column cell(Step 2 in the precious post).
hai @Madhavi this is the and this is the excel sheet
@Madhavi i have given for example that usually we have very large number that P1,P2 are the columns to be added for some it would be up to 4 numbers gor dome 20 for some 100 so can you please give me a sample flow please it would help me lot
If you are reading data from excel and updating it, use datatable activities.
- Use read range activity to read the data from excel. Output will be a datatable.
- Use for each row activity and loop through each record
- Inside the loop, check for the condition if there any and
you can directly update P1 & P2 column values in the data table and then once all the records are processed, you can write them into the excel back use write range activity.
or on each record processing, use write cell activity and update the column values.
@Madhavi sorry i i have CSV file and
Can you please send the workflow?
You dont need to do datatable.Rows(count+1) if you use for each row activity. That gives a direct access on the row.
hai can you please edit it
@Madhavi can you please edit it i was not getting how to do it
find_empty.xaml (19.1 KB)
If you can send me the workflow, i can try editing it and send it back.
If you dont want to post it in public, send though the message option.
please check it it was at the top @Madhavi
@ have you found it …?