How to make loop to start process again for another company

Good morning. We have made a process in UIpath to book a journalentry in our ERP system. This works fine. But we have to do this for each company. So when the process ends it must start to the next company. Is it possible to make a loop for this? How can we make this? We do not use a framework or the Orchestrator.

@mrusman Keep all the companies in list or Array and put your solution into Try Catch Block and put the block inside for each loop of List/Array

@mrusman

It can be done, if you maintain a excel sheet with company name, use For each loop it will trigger until you excel sheet have the rows

Hope this helps

Thanks

hi @mrusman,

  1. Keep all the JournelEntry in an ExcelFile Say Data.xlsx in a sheet say Sheet1.

  2. Data.xlsx using Excel application Scope

  3. Read Range the Sheet1 - this will give youa DataTable Sat DT having List of all journalEntries.

  4. Take a foreach loop and Iterate through the DT.

  5. use an Invoke workflow activity inside foreach and Call th xaml yoy have created taht makes an entry to the ERp sytem. This xaml should have an InputArguement Say - In_JournalEntryName.

  6. Now when you Invoke the workflow - in import arguements - the value of In_JournalEntryName. will be row(“jounalName”).toString

  • assuming the excel has the Data in a Column called journalname.


Mukesh

hi @mrusman

As @mukeshkala mentioned:

  1. image

then

1 Like

Thanks for the solutions. It works now

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.