Repeated Data Mapping – Example II

In this example we will map the repeated values to a Text Input component and display 12 repeated instances of this component.

General instructions

  • Open 02_RepeatedData2.wfd.

  • Access the Layout and its Layout Stacked 1 component.

  • Access the Subcomponents tab of Layout Stacked 1.

Setting up the repetition

  • Set its Text Input 1 child to be repeated (do not repeat the Text 1 component).

  • Select the only available Months array and rename the item to a more descriptive name, e.g., MonthsItem.

  • Proof the solution; you will see 12 empty repeated text inputs.

  • Type something into any of them (all of them will suddenly contain the same value).

  • This is because all these repeated instances are mapped to the same field outside the repeated array (Value).

Mapping instructions

  • Access the Text Input 1's repeated component Data Mapping tab and map the Value field to MonthsItem.MonthFull.

  • This makes each repeated instance value independent.

  • Proof the solution (all the Text Input 1 instances which are now independent have their values initialized from the data).

  • Access the Text Input 1 Advanced Data Mapping dialog and rename the currently used value, MonthsItem.MonthFull, to MonthsItem.MonthNewValue, for example.

  • Proof the solution (all the Text Input 1 instances which are also independent do not have their values initialized from the data because no variable called MonthNewValue exists in the array.

  • See 02_RepeatedData2_DONE.wfd.

Repeated data mapping example 2.