Skip to Content

In some scenarios we need a flexible number of selections, such that we can’t know beforehand. for example: multiple dates range, where the user may add or remove time periods. One way to achieve this is to have a number of fields on a Form View, showing the controls of the relevant ones and hiding the others:

run.PNG

The user presses + on the last visible line to add another row, and – to remove the last visible one.

Another solution using clusters

Modeling the scenario:

1. Have a Form View connected to the relevant search Data Service. Its fields could be as follows:1.PNG

2. Add a Data Share element. In the Define Data dialog add a numeric field called time_selections and set its default value to 1. This field stands for the number of selection rows:

2.PNG

3. The mapping between the Form View and the Data Service looks like this (notice the number of time selections coming from the Data Share):

map.PNG

4. Move to the layout board and arrange the From / To controls in different columns (right click => Insert Column to add a column to the Form View).

5. Add another column for the + / – buttons. Where more than one button is required add a Melting Box control and add the buttons to it.

3.PNG

6. Set visibility conditions for the Date Picker controls according to the row, depending on the time_selections variable. example 1:

4_.PNG

Example 2:

5_.PNG

7. Set visibility condition for the buttons. In this example we want them visible on the last visible row only. example 1:

6_.PNG

example 2:

7_.PNG

8. Define the Add / Remove row Actions for the control. We need to increment / decrement the value of the time_selections variable. Example 1:

8.PNG

Example 2:

9.PNG

Another solution using clusters

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply