Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP script for displaying sequential account numbers
#1
Not Solved
Can you please help me in generating sequential Account numbers in VB script.

For example : First time when I run the code, it should diplay account number as WEB000, Next time when it runs, it should check for duplicate and create a new one like WEB001.

pLEASE HELP ME Its very urgent.
Reply
#2
Not Solved
Could you please let us know as to where you want to check for the duplicate number? (Application/database,etc).However,
For generating a random number as required..
Please try this,
Result = "WEB"
For var_i = 1 to 3
Result = Result & RandomNumber(0,9)
Next
msgbox Result

Regards,
Ravi
Reply
#3
Not Solved
---------------------------

Thanks Ravi for your reply.

I am checking in the application.

My code is as below:

First Account number (EG 3000016), I am taking from the datatable.

Next time, when it runs, I have added Suffix "1" at the last , also incremented the counter.

For checing the Duplicate, I will be getting error message in the application saying "aCCount number already exists". I created Text Checkpoint for this error. This code I have put in DO while loop. whenever it returns true, next time it will imcrement the account number with "1" and check for the above error. Comes out of the loop when it is false.

Please guide me, whether the above procedure is correct, since I am new to QTP.
Reply
#4
Not Solved
Well Ganesan try and see if you could get along.
Please post your code if you get stuck with any issue.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Get numbers inside all webelements in webtable and sort them pradeep537 1 2,595 08-04-2016, 01:24 AM
Last Post: Ankur
  GCD of N numbers Venkat`s 1 1,926 10-17-2013, 08:58 PM
Last Post: Parke
  Validate Numeric value is displaying expected format kalaivanan123 1 3,391 09-23-2013, 08:45 PM
Last Post: ravi.gajul
  Why do I see strange signs by the line numbers? sqadri 2 2,798 04-05-2012, 04:36 AM
Last Post: sqadri
  Force calculated numbers to have 2 decimal places Brian.Osborne 1 6,464 06-30-2011, 11:58 AM
Last Post: Vivek Mishra

Forum Jump:


Users browsing this thread: 1 Guest(s)