Is there a way to dynamically set the values of a dropdown outside of repeat section/grid to the values of a control in repeat grid/section.
Sample orbeon code below. Need all employee names entered in repeat grid as values in the dropdown.
fr:data-format-version="4.0.0">
<xh:head>
<xh:title>Test001</xh:title>
<xf:model id="fr-form-model" xxf:expose-xpath-types="true" xxf:analysis.calculate="true">
<xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all" xxf:index="id">
<form>
<section-1>
<grid-2>
<grid-2-iteration>
<control-1/>
<control-2/>
<control-3/>
</grid-2-iteration>
</grid-2>
</section-1>
<section-2>
<control-4/>
</section-2>
</form>
</xf:instance>
<xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">
<xf:bind id="section-1-bind" name="section-1" ref="section-1">
<xf:bind id="grid-2-bind" ref="grid-2" name="grid-2">
<xf:bind id="grid-2-iteration-bind" ref="grid-2-iteration" name="grid-2-iteration">
<xf:bind id="control-1-bind" ref="control-1" name="control-1" xxf:whitespace="trim"/>
<xf:bind id="control-2-bind" ref="control-2" name="control-2" xxf:whitespace="trim"/>
<xf:bind id="control-3-bind" ref="control-3" name="control-3" xxf:whitespace="trim"/>
</xf:bind>
</xf:bind>
</xf:bind>
<xf:bind id="section-2-bind" ref="section-2" name="section-2">
<xf:bind id="control-4-bind" ref="control-4" name="control-4"/>
</xf:bind>
</xf:bind>
<xf:instance id="fr-form-metadata" xxf:readonly="true" xxf:exclude-result-prefixes="#all">
<metadata>
<application-name>repeat</application-name>
<form-name>rest-api</form-name>
<title xml:lang="en">Test001</title>
<description xml:lang="en"/>
<created-with-version>2018.2.3.201905172253 PE</created-with-version>
<updated-with-version>2018.2.3.201905172253 PE</updated-with-version>
</metadata>
</xf:instance>
<xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all">
<attachments/>
</xf:instance>
<xf:instance xxf:readonly="true" id="fr-form-resources" xxf:exclude-result-prefixes="#all">
<resources>
<resource xml:lang="en">
<control-4>
<label>Employee name dropdown</label>
<hint/>
</control-4>
<control-1>
<label>employee id</label>
<hint/>
</control-1>
<control-2>
<label>employee name</label>
<hint/>
</control-2>
<control-3>
<label>employee salary</label>
<hint/>
</control-3>
<section-1>
<label>employee details</label>
</section-1>
<section-2>
<label>Dropdown</label>
<help/>
</section-2>
</resource>
</resources>
</xf:instance>
<xf:instance xxf:readonly="true" xxf:exclude-result-prefixes="#all" id="grid-2-template">
<grid-2-iteration>
<control-1/>
<control-2/>
<control-3/>
</grid-2-iteration>
</xf:instance>
</xf:model>
</xh:head>
<xh:body>
<fr:view>
<fr:section id="section-1-section" bind="section-1-bind">
<xf:label ref="$form-resources/section-1/label"/>
<fr:grid id="grid-2-grid" bind="grid-2-bind" repeat="content" min="1"
template="instance('grid-2-template')"
apply-defaults="true"
fb:initial-iterations="first">
<fr:c x="1" y="1" w="2">
<xf:input id="control-1-control" bind="control-1-bind">
<xf:label ref="$form-resources/control-1/label"/>
<xf:hint ref="$form-resources/control-1/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="3" y="1" w="5">
<xf:input id="control-2-control" bind="control-2-bind">
<xf:label ref="$form-resources/control-2/label"/>
<xf:hint ref="$form-resources/control-2/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
<fr:c x="8" y="1" w="5" h="1">
<xf:input id="control-3-control" bind="control-3-bind">
<xf:label ref="$form-resources/control-3/label"/>
<xf:hint ref="$form-resources/control-3/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
</fr:c>
</fr:grid>
</fr:section>
<fr:section id="section-2-section" bind="section-2-bind">
<xf:label ref="$form-resources/section-2/label"/>
<fr:grid id="grid-1-grid">
<fr:c x="1" y="1" w="6">
bind="control-4-bind">
<xf:label ref="$form-resources/control-4/label"/>
<xf:hint ref="$form-resources/control-4/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
<xf:itemset ref="$form-resources/control-4/item">
<xf:label ref="label"/>
<xf:value ref="value"/>
</xf:itemset>
</fr:dropdown-select1>
</fr:c>
<fr:c x="7" y="1" w="6"/>
</fr:grid>
</fr:section>
</fr:body>
</fr:view>
</xh:body>
</xh:html>