Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
Adobe Summit 2023 | Complete list of AEM Sessions & Labs

Generate Table# and Seat# Image

Avatar

Level 3

I need your help to generate a random table# and seat# each time I click the button.

Since each table Must seat 10 people, when the manager enters a number into the Nbr.of Tables field such as 10, it means we're going to have 100 seats. Please try to help. 

function(){return A.apply(null,[this].concat($A(arguments)))}

3 Replies

Avatar

Level 10

Not sure what you are asking ......if I enter in 10 Tables you want the form to generate a table number from 1-10 and then a seat

number at that table?

Avatar

Level 3

Yes, if you enter 8 in the table field and the table seats 10 then I need to generate a table number and the the seat number. in this case will have 8 tables and 80 seats.

Avatar

Level 10

What if you generateed a series of random numbers from 1 - 80 and put them in an array. Then as each person came to register you woudl grab the random number off of thetop of the array and assign them the table and seat accordinngly.

paul