Hi,
I have a subform with 2 fields "Color" and "Thickness"(These 2 are lookup to fields in other form say F1).
Now if i select one Color, all corresponding Thickness to that Color has to be displayed for 1 time.
Say like, if you have records like Black - 3cm
Black - 3cm
Black - 3cm
White - 2cm
White - 2cm
Black - 2cm
Black - 2cm
So, if i select Black Color in lookup, that has to show like 3cm
2cm
But for the following Code it is giving output like 3cm
3cm
3cm
2cm
2cm
I wrote this code in Subform field "Color".
Say F1 is having original fields "Color" and "Thickness" to those lookups in subform
- clear row.Thickness;
- Thickness_List = List();
- for each rec in F1 [Color == row.Color]
- {
- if(!Thickness_List.contains(rec.Thickness))
- {
- Thickness_List.add(rec.Thickness);
- row.Thickness:ui.append(rec.Thickness);
- }
- }
Regards,
kmkr :)