web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Filter JobRegistration Grid with ProdNumber Lookup Field AX 2012 R3

(0) ShareShare
ReportReport
Posted on by 46

Hello,

The Main of what I need is filter the all the Route Job operations by Product number in the JobRegistration. That is to make the clock in faster since every woker nows their Production Number and ther is only few operation (7 total) to which they can stample in.

so the idea is attach one lookup field for ProdId and the filter the Grid JmgTobTable  for the available jobs in that selected ProdId

Here I have and example of a new Form i am working on. I already have the  prodId lookup Field but first. I would like to filter the jobTableGrid for only jobs in productions (as you can see is displaying all; including the system).

1. filter the Grid by Reference Id

2. filter Grid by the Selected ProdId

pastedimage1585040509294v1.png

I am not expert. since i am starting with this X++ coding , So I would appreciated that you could be as specific (for begginer) as possible so I can get this to work

thanks a lot for your kindly help

Have a great  day!

I have the same question (0)
  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at
    RE: Filter JobRegistration Grid with ProdNumber Lookup Field AX 2012 R3

    Hi CBNestor,

    I think you need to change the order of tables on the form first and change join mode to an inner join (if I remember correctly you will need to drop and add tables again to data source).  Also, make sure that ProdTable has a JoinSource as JmgJobTable.

    JmgJobTable -> ProdTable -> InventTable

  • CBNestor Profile Picture
    46 on at
    RE: Filter JobRegistration Grid with ProdNumber Lookup Field AX 2012 R3

    Hi Sergei,

    Thanks for reply Always helping. I have tried with setting the JoinSrouce from JmgJobTable datosource to ProdTable and it is working flawless. The form Grid is now filtering only data for  productions jobs.

    Now I need to filter the productions but from the Product number selected in the Lookup Stringedit field (EDT: ProdId)

    how to do that?

    thanks again Sergei

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at
    RE: Filter JobRegistration Grid with ProdNumber Lookup Field AX 2012 R3

    Hi CBNestor,

    There was an already one discussion receintly, you can check some articles mentioned in community.dynamics.com/.../filtering-a-grid-based-on-a-stringedit-value

    Hopefully, it helps

  • CBNestor Profile Picture
    46 on at
    RE: Filter JobRegistration Grid with ProdNumber Lookup Field AX 2012 R3

    Hi Sergei,

    I almost Got it. I Named the my Lookup stringEdit as NC_ProdId

    when I call this object in the ExcecuteQuery() function is says the : Variable NC_ProdId has not been declared.

    what am I missing?

    pastedimage1585057194745v1.png

  • Verified answer
    Martin Dráb Profile Picture
    236,955 Most Valuable Professional on at
    RE: Filter JobRegistration Grid with ProdNumber Lookup Field AX 2012 R3

    Have to set AutoDeclaration property of NC_ProdId to Yes?

  • CBNestor Profile Picture
    46 on at
    RE: Filter JobRegistration Grid with ProdNumber Lookup Field AX 2012 R3

    Perfect Martin, that works!, did not about it :)

  • CBNestor Profile Picture
    46 on at
    RE: Filter JobRegistration Grid with ProdNumber Lookup Field AX 2012 R3

    What Does it mean Exacly when I the sufix _q or _ds? what are those Classes? where I can find them?

    TableName_q

    TableName_ds[.methodname()]

  • Martin Dráb Profile Picture
    236,955 Most Valuable Professional on at
    RE: Filter JobRegistration Grid with ProdNumber Lookup Field AX 2012 R3

    These are variables generated for form data sources.

    If you add MyDatasource, it'll automatically create veriables like MyDatasource (the table buffer holding data), MyDatasource_ds (the FormDataSource object) and so on.

  • Blue Wang Profile Picture
    on at
    RE: Filter JobRegistration Grid with ProdNumber Lookup Field AX 2012 R3

    Hi CBNestor,

    "_q" used to access the query.

    For Example: 
    budgetControlCategorySumAll_q.dataSourceTable(tablenum(BudgetSourceTracking)).addRange(queryBuildRange.field()).value(queryBuildRange.value());

    "_ds" used to access the datasource in a form.

    For Example:
    custTable_ds.object(fieldNum(CustTable, CompanyIdSiret)).visible(false);

  • CBNestor Profile Picture
    46 on at
    RE: Filter JobRegistration Grid with ProdNumber Lookup Field AX 2012 R3

    Hi Blue Wang,

    Interesting, Thanks for the help, I really apreciate it :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 724 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 580 Most Valuable Professional

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 554

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans