+ Start a Discussion
SL TanSL Tan 

How to generate a list of values from two value inputs - need help


I wonder if anyone has come across the same scenario:


A user needs to input box numbers from which a certain starting number to the last box number.

Normally if it is going to be just a few boxes, it can be done with fields catering to the maximum numbers allowed in a page.

However in this case, the number of boxes can be anything from 1 to 100 or more, thus it is not practical to have a page that needs a user to key in the numbers one by one, from the start number to the last box number, and also time wasting.

Thus to solve this, if the user is going to deliver 11 boxes from Box No 10 to Box no 20, the user will input

as follows in the fields:

Box No. From: 10  

Box No. To: 20

Then the program calculates by way of formula –

Total No of Boxes: 11 – formula is [ (Box No. To – Box No. From)+1 ]



Up to this stage is ok. Now the user needs to prints out a report for the Box Nos delivered, thus the report needs to show the Box Nos: 10,11,12,13…..until 20.

Has anyone solved such a reporting requirement before? If so, please could you kindly advise how it is solved?

Any pointer will be highly appreciated>


There are two parts to the specific requiremnt you have:-

1. How to associate a range of box no.s in a record when the user provides the start and end box. no (lets assume the object where the user provides the input as "X" ).

2. Show the same in a report


In answer to your to the first part of your query:-

One part of the first part of your problem is to decide the data structure you will be employing for solving this.

There are 2 options:-

a. One to have a testarea field at the object level are have all the box no.s saved as a comma separated string

b. a neater approach is to have a related child object and have all the box number added as a child record instance with the parent object (X) record in question.

You may select either based on your specific customization requirement.

Next is the question where are the box numbers saved , to which i am assuming they are saved in a object say box_number.

Now the questiona rises how to bring the information the box numbers either at the X object's level or in the child object of "Object X". This can be achieved using a trigger on object X which will check the fields Box From and Box to and bring the range of Box numbers either as a  comma separated sting or add equivalent number of child records for the number of box numbers present.


2. Now to the second part of the issue reporting , tothis

i. if you are bring the information at the level of object X then a simple report will suffice.

ii. else you will need to build a report around the data sorce involving ObjectX- Child object (Linker object between Box numbers and Object X)


Hope this gives you the necessary point to solve the issue faced by you, if it does then please do mark it as a solution.



SL TanSL Tan

Hi Ispita

Thanks for your kind reply. Do you have any idea how to associate the range of box numbers in such a scenario? I am at my wits end how to solve this. Hope you can help me with some pointers

Thanks a lot in advance.