Mulitple invoices - While activity

Hi Experts,

I have used ‘While’ activity for looping through multiple invoices.
However, it seems like the ‘While’ activity is only activated for the first invoice. It does not activate on the further invoices.
May I know what happen and how can I make the ‘While’ activity work for multiple invoices?

Thank you.


@Steven_Kho - could be your while loop condition.
pls write the condition in log activity and check - is the variable data is correct…

Hello, the condition works perfectly if I run the robots for each invoice individually, one at a time. But when I use the ‘pdffiles’ and ‘pdfpath’ etc, it doesn’t work anymore.

@Steven_Kho - pls check the variables declared in the while loop are re initializing /reset value with zero or expected value on every new invoice…

Hello

Could you teach me how to do that?
Thank you very much!

@Steven_Kho - you can use assign activity
ex -: counter = 0
intcheckinvoice = 0

add this activity before every new invoice process
initialize all variables with zero, string.empty or null which are using for decision making

1 Like

@GBK

Thank you so much. Now it works :slight_smile:

1 Like

@Steven_Kho - cheers!!

1 Like

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