Hi Team,
Please, i have repeating group (Group Name : Table) with 9 fields ( Field1, Field2( is CarID), .. Field9)
I need to copy the text value of Field2 of instance 1 to instance 2 (if instance 2 is empty)
I created script rule at level of table (owned by table) to check if instance2 in the group is empty then get value from instance1. but im getting error during run time
"A rule owned by repeatable group or its' child should change only child field of this group"
Here is the code (VB Script):
dim i
i = Me.Field("Table").Items.Item(1).Field("CarID").items.Count
for i = 0 to i-1
if i>0 then
if (Me.Field("Table").Items.Item(1).Field("CarID").Items.Item(i).Text ="") AND (Me.Field("Table").Items.Item(1).Field("CarID").Items.Item(i-1).Text<>"") then
Me.Field("Table").Items.Item(1).Field("CarID").Items.Item(i).Text = Me.Field("Table").Items.Item(1).Field("CarID").Items.Item(i-1).Text
end if
end if
next