This is a different question now, but could a repeating structure be compatible within another repeating structure? I am setting up a repeating structure to add multiple objects and within the object have time/day restrictions for every day of the week. For example: "Bob is assigned multiple keys at work, and the keys allow for different days/times out of the week." How can I look to accomplish this? Thanks.
RE: Nested Repeats
If you search for 'repeat binding' on this forum you should find some useful threads, discussing this feature. An example is below:
http://www.hyfinity.com/node/328
In your example you would probably bind keys against your first repeat and then bind your days/times of the week against the inner repeat.
Kind Regards
Abdul
RE: Nested Repeats
Attached is a photo of what I am trying to accomplish.
When the first few rows of repeat_key_time_access is entered for the first key, whenever I add a new key, it just duplicates the first key and the key time. And whenever I remove a key time, it removes all of the key times for the others too.
RE: Nested Repeats
I'm assuming your outer repeat repeat_keys is bound to data element KEY_REQUEST_KEYS/record. You do not appear to have any structure in your data that describes the fact that for a KEY_REQUEST_KEY/record element there are many KEY_REQUEST_ACCESS_TIME/record elements.
You should either nest KEY_REQUEST_ACCESS_TIME within KEY_REQUEST_KEY in your data or, if you need your data in the existing structure, adapt your XPaths to relate the two repeats. For example, your inner repeat repeat_key_time_access binding might look something like the following:
/mvc:eForm/mvc :D ata/KEY_REQUEST_ACCESS_TIME/record[PROCID = $repeat_keysLoopEntry/PROCID]
In this case, your SUNDAY binding can remain the same or just state SUNDAY since the repeat binding context will be able to figure out which SUNDAY you are referring to.
Hope this helps.
Regards
Abdul