in ax 2012 can we write while select in form level of datasource init method ??

hi ,

i am trying to pick the record form purchtable as the datasource

i am writing the while select along with query

code as below:

while select purchtable

index hint purchid




is this write way to do , if it is wrong please guide me how to do




This code add a single range for for every record in PurchTable, but it sets no value, so it’s completely useless.

It’s not clear to me what you’re trying to achieve, so I can’t tell you what to do until you provide more information.

hi martin,

the requriment is adding item requriment line to existing purchase order

item requriemnt lines means salesline

when user select some lines , in that projid is there , based on the projid ,and i am showing the user purchtable records on the form grid.

so that i am using the query range in the while select statement.