Hi, I am trying to create an analytic application to select random items.
The critical fact is that the user must select how many items he wants to get. The maximum minumum size of the sample is 1 and the maximum size of the sample must be 25.
The user will have to select 2 choices in the inteface:

If he inserts a .xlsx sheet and it has less items than the sample size he selects, it should make the user start at the first stage (and I don't know how to do that).
Also, once the user selects the sample size, the tool random should set the number of the sample size indicated by the user and set it in the random sample tool: (the number in yellow should always be between 1 and 25, and it should be getting the data from the user interface)

Could you please help me build the interface and solve the actual problems?
I am attaching what I have been able to do untill now, and a population that shoud be choosing the sample for.
Thank you,
Francesc