Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. Forums > Products Zone > Testing Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Testing Anywhere Post messages and questions related to Testing Anywhere here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-24-2010, 08:23 AM
cfereday cfereday is offline
Junior Member
 
Join Date: Jun 2010
Posts: 19
Question Rounding figures up/down

Hello,

Please can you tell me if it is possible to round figures up / down to a required number of decimal places in Testing Anywhere?

I am using the Variable Operation to calculate the value of one of my Variables and need to round this figure down to 2 d.p. Please can you tell me if there is a function to do this?

Thanks and Regards, Claire.
Reply With Quote
  #2 (permalink)  
Old 11-26-2010, 12:44 PM
forumstaff forumstaff is offline
Senior Member
 
Join Date: Oct 2010
Posts: 521
Default

Hello,

Unfortunately, there is no function to round up values in Testing Anywhere.

However, we have prepared a sample Test for you which will round up the value. If any value whose decimal is greater than or equal to 0.5 (For example 100.6) is passed, the Test will round up to the higher value (result: 101) and if the value is less than 0.5 (For example 100.2) than the return value will round up to the lesser value(result: 100).

Follow below mentioned instructions to run the test:
• Save the attached Sampletest.tamn to My Documents\Testing Anywhere\Testing Anywhere\My Projects
• Launch Testing Anywhere, select the Test and Run. It will prompt for the decimal value, please select any decimal value in the prompt and hit ok. It will return the rounded up value.

Please let us know how it went.
Reply With Quote
  #3 (permalink)  
Old 02-22-2012, 09:28 AM
mzbutt mzbutt is offline
Junior Member
 
Join Date: Dec 2011
Posts: 4
Default Round function

can i have that file as well. because i am also trying to roundup or round down the value
Reply With Quote
  #4 (permalink)  
Old 02-22-2012, 04:48 PM
forumstaff forumstaff is offline
Senior Member
 
Join Date: Oct 2010
Posts: 521
Default

Hi mzbutt,

Attached is the sample which rounds off the decimal values. If the number after the decimal point happens to be greater than or equal to 5 then, the final value will be the number + 1 else, the value will be rounded off to the number before the decimal point.

Ex. 48.50 becomes 49 and 48.40 becomes 48.

Download and Save the test under 'My Projects'. To locate the path of the 'My Projects' folder, right click on any of the existing tests and select the 'Locate on Disk' option.

Hope this helps.
Attached Files
File Type: zip Forum_Sample Rounding figures up-down.zip (567 Bytes, 1 views)
Reply With Quote
  #5 (permalink)  
Old 02-24-2012, 11:48 AM
mzbutt mzbutt is offline
Junior Member
 
Join Date: Dec 2011
Posts: 4
Smile Rounding figures up/down

Thank you for your help.
I was not able to open up the file. Should i change the extension ?

Thank you
Reply With Quote
  #6 (permalink)  
Old 02-24-2012, 03:50 PM
forumstaff forumstaff is offline
Senior Member
 
Join Date: Oct 2010
Posts: 521
Default

Hi,

What extension does the file have in the zip? If it does not have any extension, you can try saving it with a .tamn extension at the end.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -7. The time now is 02:39 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved