Question
MUFG Pension & Market Services
IN
Last activity: 4 Oct 2018 13:54 EDT
Generating Random numbers
How to generate six digits of random numbers?
***Updated by moderator: Lochan to update Categories***
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Likes (4)
William Miller SANDHI SANDHI MUDAVATH Naresh keerthi Phanidapu -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Coforge
AU
We can customise OOTB acitivity pyGenerateCustomCaptcha to get the random random numbers.
-
TEJA CHALLAGUNDLA
Shell
IN
Hi Ajay,
Thank you for posting your query to PSC.
If your requirement is to generate Unique ID..then you can refer the below post.It may help you.
https://collaborate.pega.com/question/generate-unique-id-primary-key-data-table
Regards,
Chinmai Sravanthi.
Pegasystems Inc.
IN
Have a look at this post. You might find some good inputs there.
Wipro Ltd
AU
Hi Santanu,
The article mentioned by you is talking about "randomTrueGenerator" function that returns true or false based on the Percent input provided.
Is there any OOTB function that returns a random number between a given range (say Min=3, Max=10)
Pegasystems Inc.
IN
Please refer to below post for solution to this.
Let us know if this helps :)
Pegasystems Inc.
IN
Moreover you can tools.getThread().getSystemRandom() to get the Random classes instance and simply use the methods within this java class to achieve what you are looking for.
Wipro Ltd
AU
Hi rawap, thanks for the above reply. I am aware of the above java code shared by you but one of my Pega colleague told that there is an existing Pega function to achieve the requirement and hence I was enquiring on the same. Now I can conclude that there is no existing function.
Thanks for sharing the above information.
Cognizant
IN
I used activity to create the random number.But it is showing status fail. Can anyone help me to solve this?
Pegasystems Inc.
US
Could you trace and see where it is failing to find the root cause of the failure.
-
shilpa kunuku