I have been looking for a way to search a table in Navision. From previous posts I have discovered that I can loop through a table setting marks on records which match my criteria then show only the marked as below
// Filter on FieldA
SETCURRENTKEY(FieldA);
SETRANGE(FieldA, ValueA);
// Mark records
IF FIND('-') THEN
REPEAT
MARK(TRUE);
UNTIL NEXT = 0;
// Remove filter again
SETRANGE(FieldA);
//set primary key and display marked only
Whether this is the best way to do it or not I am unsure. My problem is that I want to display only one field of the results e.g FieldB. Because FieldB is not the primary key of the table there are duplicate values. I only want to display unique values. Is there a navision function for doint this or a way around it?
0
Comments
In SQL we use the Keyword "UNIQUE" to get a list of Unique values how can we do it in CAL?
GD
??
you want to display a unique field that has mutliple matches?
well there must be something differnt about it to find it
http://www.BiloBeauty.com
http://www.autismspeaks.org
GD