85
Views
14
Comments
Solved
Random Name generator
Application Type
Reactive
Service Studio Version
11.53.42 (Build 62025)

Anyone here has a sample application of Random Name generator using outsystems or using javascript in Outsystems. Appreciated if you can share your oml. Thank you!

2023-10-26 15-12-53
Mohammed Rizwan
Solution
2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello @RD. 

I have created this via sample data set by using a simple SQL query, I am attaching a sample that could help you to demonstrate it

Sample - Random name generator

Also, check the attached Oml

I hope this helps

Best Regards
Tousif Khan

RandomName_Sample.oml
UserImage.jpg
RD.

Thanks also Tousif Khan for this, this also solve the problem.

UserImage.jpg
RD.

I already tried this one but not get the right result.

UserImage.jpg
RD.
2023-10-21 19-42-11
Tousif Khan
Champion

Hello

Do have data set for name, or you would like to get the random name data via API ?

Thanks
Tousif Khan

UserImage.jpg
RD.

Can we pull the names via external link. Something like this - https://replit.com/@theunlikelydev/Random-Name-Generator 

2022-02-25 19-42-59
Srinivas K Singadi

Hello RD

you can create a random name generator by creating a list of names and using the Random function to select a name from the list. Here are the general steps:

Create a list of names in Outsystems. You can create a static entity with a Name attribute and populate it with a list of names.

Create a screen in Outsystems to display the generated name.

Create an action in Outsystems to generate a random name. In the action, use the Random function to select a name from the list of names created in step 1.

Call the action in the screen created in step 2 to display the generated name


// Create an array of names

var names = ['Alice', 'Bob', 'Charlie', 'David', 'Emma', 'Frank', 'Grace', 'Henry', 'Isabella', 'Jack'];

// Generate a random number between 0 and the length of the names array

var randomIndex = Math.floor(Math.random() * names.length);

// Select a name from the names array using the random index

var randomName = names[randomIndex];

// Display the generated name

console.log(randomName);

2023-03-16 04-58-56
Ashish Lonkar
2023-10-26 15-12-53
Mohammed Rizwan

Hello

I have attached the sample oml for your use case. 

Thanks

Rizwan

SampleTest.oml
UserImage.jpg
RD.

Hi, your oml is a very big help. Is there a way we can do it like First Name and Last Name or something like this  (https://replit.com/@theunlikelydev/Random-Name-Generator) that we are pulling names in the external link. Thank you

2023-10-26 15-12-53
Mohammed Rizwan
Solution
UserImage.jpg
RD.

Thank you so much Rizwan, this one clears my mind.

2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello @RD. 

I have created this via sample data set by using a simple SQL query, I am attaching a sample that could help you to demonstrate it

Sample - Random name generator

Also, check the attached Oml

I hope this helps

Best Regards
Tousif Khan

RandomName_Sample.oml
UserImage.jpg
RD.

Thanks also Tousif Khan for this, this also solve the problem.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.