A random output
Options
![Yoann Akabassi](https://us.v-cdn.net/6037124/user_avatars/2373071.jpg)
Yoann Akabassi
Member ✭
I would like to know how to make an api that allows us to enter 2 or more texts and that chooses 1 randomly to give us an answer, among those recorded
And also if it is possible to define a rate of chance that a value record appears more than another
And also if it is possible to define a rate of chance that a value record appears more than another
Comments
-
So this probably isn’t the only way to do this but I took it on as puzzle to figure out. This method is rather basic, so in order to favor an outcome would be to simply duplicate that value in the input. for example texts[“a”,”b”,”c”,”b”] - here “b” has a 50 percent chance of being selected. You could probably use this as a foundation and build something more complex.
[597FBB21-106A-4CAB-BF49-C6341B019218] -
Thank Youuuu very much
-
If I want to put in bravo studio I choose get or posts as it is an api.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback