cancel
Showing results for 
Search instead for 
Did you mean: 

Node repitition with default values

Former Member
0 Kudos

Hi,

There is a node with cardinality 0 to unbounded (corresponding to 7 days in a week) in my source structure. This node has some subfields fields in it.

The source node can occur from 0 to a maximum of 7 times.

This source node is to be mapped to a target node which should be created as many times as the source node occurs and the fields in target node are directly mapped with fields in the source node with some default values(mapWithDefault).

The problem here is if the source node doesn't occur at all in the source structure, the target node should occur exactly 5 times (corresponding to Monday-to-Friday) with some default values for the fields in it. The nodes for Saturday and Sunday shouldn't occur and there are no default values sent for the fields in it.

Need inputs on how to achieve this.

TIA

SAI

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

use "duplicate subtree" for target node 5 times.

Assign source - exists - not - createIf each time.

The default values for the subnodes have to be assigned also 5 times each.

Answers (0)