V
Victor
Hi,
I have a scenario like this. I let user key in their equipment data in a
repeating table. The equipment data are IssueDate, Item, Category and
ReturnedDate. User can key in IssueDate, Item, Category in the repeating
table. But they can leave the ReturnedDate blank. They only fill in the
ReturnedDate when they return the equipments. There is also a field named
Status outside the repeating table to indicate the equipment's returned
status. If all the equipments in the repeating table have been
returned(meaning all the ReturnedDate must be filled) , the status will
change from 'Active' to 'Closed'.
I have already got the solution of this using Rules and Set Condition in
the group's data nodes. Now i also want to update the Status when user delete
or add new rows by using custom code in the group's AfterChange event.
How do i loop through the group's data nodes to compare if all the nodes'
ReturnedDate have been filled in using programming codes?
I have been trying to use the groups' length like
var
nItem=XDocument.DOM.selectNodes("/my:myFields/my:Items/my:Item/my:ReturnedDate").length
and use a for loop to loop through the nodes. Actually, inside the group's
AfterChange event, it loops all the nodes. How do i loop through only
ReturnedDate nodes and compare the value of the ReturnedDate nodes if they
are blank or not blank using programming?
Can someone help me by providing me a few line sof codes?
Thanks.
I have a scenario like this. I let user key in their equipment data in a
repeating table. The equipment data are IssueDate, Item, Category and
ReturnedDate. User can key in IssueDate, Item, Category in the repeating
table. But they can leave the ReturnedDate blank. They only fill in the
ReturnedDate when they return the equipments. There is also a field named
Status outside the repeating table to indicate the equipment's returned
status. If all the equipments in the repeating table have been
returned(meaning all the ReturnedDate must be filled) , the status will
change from 'Active' to 'Closed'.
I have already got the solution of this using Rules and Set Condition in
the group's data nodes. Now i also want to update the Status when user delete
or add new rows by using custom code in the group's AfterChange event.
How do i loop through the group's data nodes to compare if all the nodes'
ReturnedDate have been filled in using programming codes?
I have been trying to use the groups' length like
var
nItem=XDocument.DOM.selectNodes("/my:myFields/my:Items/my:Item/my:ReturnedDate").length
and use a for loop to loop through the nodes. Actually, inside the group's
AfterChange event, it loops all the nodes. How do i loop through only
ReturnedDate nodes and compare the value of the ReturnedDate nodes if they
are blank or not blank using programming?
Can someone help me by providing me a few line sof codes?
Thanks.