hi all,
I have a form (Inwards) in which there is subform (remaining items on P.O).
forget count 0 plz
on count 1, subform add row i have populated count 0 data to subform which is working nicely
on 2nd count, subform add row i want to populate (remaining items on P.O) to same form.
i am using this script for 1st and 2nd count
- if(Inwards[Purchase_Order_Number == input.Purchase_Order_Number && Field_field == "Open"].count() = 1 )
- {
- rec = inward_items_lookup[Inwards == input.Inward_Number];
- i = 0;
- a = List();
- b = List:Int();
- c = List:Int();
- d = List:Int();
- e = List:Int();
- f = List:Int();
- get_sf_values = Inwards[Inward_Number == Inward_Number].Items_Received;
- for each rec in get_sf_values
- {
- a.add(rec.Item4);
- b.add(rec.UOM4);
- c.add(rec.Rate_Unit4);
- d.add(rec.Remaining_Quantity1);
- e.add(rec.Department_and_cost_center);
- f.add(rec.Job_ID);
- }
- for each rec1 in Remaining_Items_on_P_O
- {
- if(a.size() > i)
- {
- rec1.Item9=a.get(i);
- rec1.UOM9=b.get(i).toString();
- rec1.Rate_Unit9=c.get(i);
- rec1.Remaining_Quantity9=d.get(i);
- rec1.Department_with_cost_centers9=e.get(i);
- rec1.Job_ID=f.get(i);
- }
- i = i + 1;
- }
- }
- if(Inwards[Purchase_Order_Number == input.Purchase_Order_Number].count() = 2)
- {
- rec3 = Remaining_items_inward_lookup_for_open_PO[Inwards == input.Inward_Number];
- i = 0;
- a = List();
- b = List:Int();
- c = List:Int();
- d = List:Int();
- e = List:Int();
- f = List:Int();
- get_sf_values = Inwards[Inward_Number == Inward_Number].Remaining_Items_on_P_O;
- for each rec3 in get_sf_values
- {
- a.add(rec3.Item9);
- b.add(rec3.UOM9);
- c.add(rec3.Rate_Unit9);
- d.add(rec3.further_remaining);
- e.add(rec3.Department_with_cost_centers9);
- f.add(rec3.Job_ID);
- }
- for each rec4 in Remaining_Items_on_P_O
- {
- if(a.size() > i)
- {
- rec4.Item9=a.get(i);
- rec4.UOM9=b.get(i).toString();
- rec4.Rate_Unit9=c.get(i);
- rec4.Remaining_Quantity9=d.get(i);
- rec4.Department_with_cost_centers9=e.get(i);
- rec4.Job_ID=f.get(i);
- }
- i = i + 1;
- }
- }
there is an error on 2nd count saying
Error occurred while executing on add row script.
please help