How to show a message box, stating the total invoice value?

Hello I am quite new to UiPath, so I was wondering is it possible to show a message box, stating the total invoice values? Values were extracted from PDF.

1 Like

@how2awpp
Welcome to uipath community.
Yes ,you can use message box
image

here totalinvoicevalue is the variable

2 Likes

@sangeethaneelavannan1 I am able to do that part, but is there a way to add all the values from the “totalinvoicevalues”? Currently, it will show each value 1 by 1

1 Like

Assign totalvalues=totalvalues+totalinvoicevalues inside and after all iterations use the message box to show total values

2 Likes

@sangeethaneelavannan1 is this how it should be?
image

I have tried this method, but it seems like it is not adding the amount

1 Like

Capture

1 Like

Hello @how2awpp

If the value is in string format you need to change it to integer by using CInt.

CInt(totalvalues)+CInt(totalinvoicevalues)

Thanks

2 Likes

@how2awpp
Could not see your image
Yes As Rahul said you need to change it to int

2 Likes

@Rahul_Unnikrishnan @sangeethaneelavannan1
Capture
Yes the values is in string format as after this activity, I have to extract the information to an excel file.

I have tried the Cint(totalvalues)+Cint(totalinvoicevalues)

The amountdue contains all the values extracted from the PDF

1 Like

Just to add on, AmountDue is in string format

1 Like

Totalinvoice should be an integer datatype and you need to give,

TotalInvoice.ToString

in the message box.

2 Likes

What is the datatype of totalInvoice? it should be int and total invoice should be in message box

2 Likes

@sangeethaneelavannan1


There is an error if I were to run this program.

I am unable to chance the AmountDue to int as it will affect the extraction of data to csv

1 Like

There is 9 values in “AmountDue”

1 Like

@how2awpp
Can we have a screenshot of full workflow?

2 Likes


Here is my workflow, to extract the values for AmountDue I used text left/right

1 Like

Capture
This is the error that popped up

1 Like

@sangeethaneelavannan1 @Rahul_Unnikrishnan

1 Like

@how2awpp Try this cbdl(AmountDue) or remove the space in AmountDue
Amountdue.replace(" ",string. Empty)

You have space before 86 and it need to be removed.

1 Like

Is it resolved???

If there are spaces you can use Trim method to remove it and then use CInt to convert to integer.