Hi Julian,
I'm attaching a form that demonstrates how you can do this. The technique is a little tricky, but you can add the functionality to your own form by doing the following:
- Export the Iterator.xml file from the form's resource files
- Add it to your own form as an XML file data source
- Copy over the rules from the Iterator data source's start and trigger fields. To save you some hassle with modal dialogs and, here are the rules and formulas:
start field:
- Rule: Copy value to first
Set first/@remainder to . (current field)
- Rule: Trigger operation
Set step/@trigger to (blank)
Set step/@trigger to "go"
- Rule: Determine result
Set @result to substring(xdMath:Eval(xdMath:Eval(../step/@value[. != ""], 'concat(" ", .)'), ".."), 2)
trigger field:
- Rule: Process values
Condition: @trigger is not blank
Set @remainder to substring-after(../preceding-sibling::*[1]/@remainder, " ")
Set @value to substring-before(concat(../preceding-sibling::*[1]/@remainder, " "), " ")
Set @value to concat(translate(substring(../@value, 1, 1), "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), substring(../@value, 2))
If done correctly, any time you set a value to the start field, the result should be deposited in the result field.