Axaptapedia is now maintained by AgileCadence For more information please click here.

Difference between revisions of "Range"

From Axaptapedia
Jump to: navigation, search
 
m
Line 3: Line 3:
  
 
This is what i have so far,
 
This is what i have so far,
 +
<xpp>
 
.
 
.
 
.
 
.
Line 21: Line 22:
 
   }
 
   }
 
}
 
}
+
</xpp>
 
This works if there are ranges and if there are none which sounds perfect..however,
 
This works if there are ranges and if there are none which sounds perfect..however,
 
The bug in Axapta assumes there is a range but when it gets to Line 5 it throws an error - which is correct because its trying to access a range when in actual fact there is none.
 
The bug in Axapta assumes there is a range but when it gets to Line 5 it throws an error - which is correct because its trying to access a range when in actual fact there is none.
 
So does anyone know the coding behind the method rangeCount()?
 
So does anyone know the coding behind the method rangeCount()?
 
Please could someone HELP.
 
Please could someone HELP.

Revision as of 00:54, 8 September 2006

Axapta has a kernal method called rangeCount() which obviously cannot be seen/altered. This method returns the number of ranges in a specific query. I would like to know the coding in this method as Axapta 4 has a bug - it does'nt return the correct number.

This is what i have so far, <xpp> . . . int counter = 1;

while(counterRun = true) {

 _queryBuildRange = _queryBuildDataSource.range(counter);//Line 5
 if(_queryBuildRange.value())
 {
   counter++;
 }
 else
 {
   counterRun = false;
   counter = 0;
 }

} </xpp> This works if there are ranges and if there are none which sounds perfect..however, The bug in Axapta assumes there is a range but when it gets to Line 5 it throws an error - which is correct because its trying to access a range when in actual fact there is none. So does anyone know the coding behind the method rangeCount()? Please could someone HELP.