How to filter Data Using "SELECT" statement in a form in AX 2012

Hi to all,

Can anyone please help me with the issue, I know i can filter record using query in a form in AX 2012,

but how to filter the record using “select” statement in a form in AX 2012.

Thanks in Advance.

Regards,

Alonso

It’s not possible. Use the query framework.

Hi,

Your question is not so precise so I’ll try to give you leads:

-Filtering records using query in form: you cann add an executeQuery() method on your form datasource like follows

this.query().datasourceNo(1).addrange(fieldnum(yourTable,yourfieldyouwanttofilteron)).value(valueyouwanttofilteron);

I’m using AX 2009 but I think this works in AX 2012

  • in AX 2009, I never user select statement in form, can you be more specific?

regards,

Thomas

Hi Thomas,

Thanks for the reply…actually i want to display Purchase req Workflow approvers in a form, so i thought writing select statement will be easy to get the records…

Regards,

Alonso

Thanks Martin for the reply…,