Solved Calculation: Divide two numbers and get whole number only

maera

New Member
I'm trying to use calculation and divide two numbers in which I only want to get the whole number as an output. I know how to do this in other languages like C++ when you only use the data type integer so that it would automatically exclude the remainder but I can't seem to find one for Blueprism. (No rounding off, just the plain whole number)

For example:

15/7 = 2.1428.......
18/7 = 2.5714.......

But the output I'd like to have is 2 for both expressions.
 

RDawson9

Geek
Staff member
Hi,

You could use the Mid() function to get the value before the decimal point.

Something like this:

1526894637500.png

1526894659273.png

Hope this helps :)

Rob
 

junjie

Member
Hi,
the above is for a specific number, right ?
but i have a column and it has rows (values) with decimals. (in an excel file)
how to write in the calculation to get rid of the decimals for all rows in this column ?
i try : RndDn([columnA],0)
but it shows error : missing data [columnA]
:(
 

VJR

Well-Known Member
Hi junjie,

The way to refer a column in a collection is [CollectionName.ColumnName].
 

junjie

Member
hi bro
please help how to resolve this problem :
in an excel file, there's 1 column having 2 rows indicating 2 excel names
how to open this 2 files from this excel ?
column A, row 1 : city list (name of an excel file)
column A, row 2 : district list (name of an excel file)
now, need to open this 2 files from here , how to do it ?
 

junjie

Member
hi bro
also, let's say, this column may have 3 rows, 4 rows ...
the purpose is to open whatever files indicate in the rows in this column
so, how we can make RPA to pick up and open those files accordingly ?
 

VJR

Well-Known Member
Hi junjie,

The title of this thread and the query you have enquired about does not match.
Would you please paste the same by opening a new thread under Blue Prism if that is the tool you are looking for?
 

VJR

Well-Known Member
oops , i cannot find how to post new topics : (
Click on the wordings RPA Forum on the top left hand corner of this website.
This will take you to the list of topics/threads/etc.
Click on Blue Prism. Then on the right hand side click on Post thread.
 

Jagath Guru M

New Member
Hi Guys,
For this problem i am having a partial solution by roundingoff a number(s) (Ex: 25.30 to 25) to a whole number.
For Example I have encountered a same stoppage while i had to convert the decimal numbers in collection to whole numbers.Then i found a function called"Round" with Expression "Round({Number}, {Places})".One can use simple Data item or Collection to give value to calculation,Decision,choice or Multi calc.There you can find this function. Use it like ""Round([Collection Name],0".This will make the value RoundedOff.
 
Top