How to Fill Varying Excel Data into Web App Fields with Looping Question

Hello UiPath Community,

I am facing a challenge in my automation project and could use some guidance on how to approach it effectively. I’m working on a workflow where I need to fill data from an Excel sheet into a web application’s fields. The complexity arises because the data in the Excel sheet varies from one row to another, and I want to ensure that all required data for a specific task is filled before moving on to the next one.

Here’s a brief overview of the scenario:

  • The Excel sheet contains data for multiple patients.
  • Each patient may have a different number of treatments recorded in the Excel sheet.
  • I need to automate the process of filling the web application fields with data from the Excel sheet, ensuring that all data for a particular patient’s treatments is filled before moving to the next patient.
  • I also want to implement checks for data completeness before advancing to the next treatment.

I’m using UiPath Studio, and I’m looking for advice on the best approach and workflow design to handle this dynamic data scenario efficiently. Any suggestions, sample workflows, or guidance on how to structure my automation project would be greatly appreciated.

Thank you in advance for your help!

@Aditya_Nalawade

Can you please show the input structure of the file

Does eqch row contain one patient detail?

And different columns are dedicated to eqch type of test?

What layout are we looking at

And depending on test will other fields vary? If yea how?

Cheers

image

@Aditya_Nalawade

Looks like a straight forward one…please have a look at this

cheers

1 Like

. Here’s a breakdown of the process:

  1. Log in and fill in the necessary details.
  2. Navigate to the “Patients” tab.
  3. Enter the patient’s Name and DOB and find the person.
  4. Fill in the billing details.
  5. Go back to the “Patients” tab.
  6. Repeat the process for a different patient.

The challenge I’m facing is that some patients have completed 4 treatments, while others have completed only 2. I want to ensure that all required data is filled completely for each patient before moving on to the next one.

Could someone please guide me on how to implement a data completeness check in UiPath? Specifically, I would like to know how to:

  • Verify that all mandatory fields for the current patient are filled before proceeding to the next one.
  • Handle cases where data is incomplete, such as logging an error or skipping the patient.
  • Create a structured workflow that allows for efficient data validation and processing.

@Aditya_Nalawade

What you can do id get all the unique patient names and then use them to fill the data…also for validations also you can create if condtions inside the loop and check if data is present or not

  1. Say the data is read into DT a datatable
  2. Now get all unqiue names using assign uniquedt = dt.DefaultView.ToTable(True,"Patient Name")
  3. now loop through the uniquedt which is each patient
  4. Inside loop use filter datatable to get only the required patient which is “Patient Name” = currentRow(0).ToString and save in filtereddt
  5. Now filtereddt has the rows only for one patient…like this for each iteration you will have detaiils of only one patient

further using that data you can do check or fill data as needed

cheers

Thank you for your response, but I still do not understand the workflow. I will give it a shot and get back to you.

1 Like

Hello, sir. Is there a YouTube video tutorial for this?

Please verify to make sure it is accurate.

As a result, when I run this workflow with just the patient name and the Type into Text activity, it only writes the patient name once (for example, Candance Dean is written three times), and then it moves right on to the next patient, so we can assume that it is working as intended

image

@Aditya_Nalawade

There is no tutorial for whole process as such

The workflow is perfect till mow…it is as intended

Now build on top of it…you need to loop through filtereddy…and in the first iteration of the filtereddt which you can know by using the index property in the for loop properties panel, you need to fill the patient details and in other loop fill only the test details

So if index=0 inside the second filtereddt loop…then fill name of patient etc and on else side do nothing

And after if fill the test name etc so that for every iteration these are filled…so this repeats for each patient

Cheers

Sorry for the inconvenience, but I am unable to understand:)

@Aditya_Nalawade

which part?

try to read and do parallely and show if you are stuck…can guide accordingly

cheers

You probably already know what I need to do, which is to take the patient, input their data into the Web application, and then move on to the next patient once all of their data has been entered.

So now I need to take a different value from an Excel sheet and write it in a web app where I need to assign it and do all the stuff.

@Aditya_Nalawade

that is what I explained above…if you do that and are stuck can help

cheers

Here is a short video showing what I need to do. I really need to finish this project, so if you have time, please watch it.

@Aditya_Nalawade

As all the test element details are different…you need to indicate each seprately and based on the test value you can use if activity to check if test matches then click those tests…

So basically inside the loop use all these if conditions

Inside the unique for each…use another for each for filtereddt

Inside that use if condition eith index = 0 …and index is the property in for eqch of filtereddt

And on else side use the intial patient level details like name date etc

After if use all the other ifs to make clicks based on tests that are written

Cheers

1 Like

Hello, Sir. I attempted but failed to do this, so here is another approach: for each invoice, I will create a new excel file, and then I will do further processing; please let me know how is approach?

Hi @Aditya_Nalawade ,

Could you let us know if you have tried to perform this part ? Are you facing difficulties in this approach. Could you point us to the exact issue when you tried this approach ?

The Methods provided by @Anil_G , should work.

We could connect separately if time is the matter.

@supermanPunch Sir Till this, i was able to do

but after that, I made an attempt to understand what @Anil_G had said, but I utterly failed.

I was able to build the below workflow using Chatgpt and other resources, but it is not working as expected.
Billingloop.xaml (374.7 KB)