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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Form Tables Data Manipulation

(0) ShareShare
ReportReport
Posted on by 209

I have to make a form that Shows data EcoResProduct / InventTable

and need to show its Variants(Color, Size, Style)

I already made the Query, (which I tried by opening the Tables and relating Keys)

here is my query:

3733.1.png

also set to Outer Join.

here is the structure that I want to get:

1185.2.png

the query looks fine for me.

I created the Form, with my Query as DataSource

I also made a Grid, and drag the fields needed to show.

But after opening the FORM, the Variants(Color, Size, Style) is not showing, only showing the SearchName. 

I tried solving it for hours but i cant seem to get the solution. hope you might help me. thanks.

*This post is locked for comments

I have the same question (0)
  • XSpy Profile Picture
    209 on at

    2110.2.png

    sorry, here's the true data structure.

  • Martin Dráb Profile Picture
    237,926 Most Valuable Professional on at

    Please test your before trying to use in the form. If it works, you have a problem in the form and if you need help from us, you'll have to give us some information about it. If the query doesn't work, putting into a form can't help. You have to fix the query. Let's see which case it is.

  • Suggested answer
    5400 Profile Picture
    7,162 on at

    3113.55.jpg

    Please add relation with colorProductmasre,sizeproductmaster,styleproductMaster

  • XSpy Profile Picture
    209 on at

    1-_2D00_-Copy.png

    it already have.

    ----

    @Martin, I tried making a job which has the code:

    EcoResProduct ecoResProduct;
    EcoResColor ecoResColor;
    EcoResSize ecoResSize;
    EcoResStyle ecoResStyle;

    Query query = new Query(queryStr(MYQUERY));
    QueryRun qr;
    qr = new QueryRun(query);

    while(qr.next())
    {
    ecoResProduct = qr.get(tableNum(ecoResProduct));
    ecoResColor = qr.get(tableNum(ecoResColor));
    ecoResSize = qr.get(tableNum(ecoResSize));
    ecoResStyle = qr.get(tableNum(ecoResStyle));

    info(strFmt('%1 - %2 - %3 - %4', ecoResProduct.SearchName, ecoResColor.Name, ecoResSize.Name, ecoResStyle.Name)); // and so on...
    }

    and the Color, Size, and Style is not showing. how can we do it?

  • XSpy Profile Picture
    209 on at

    i tested the table relationships by opening each table in AOT and connecting the said Fields, and it to WORKS. but it can't seem to work when i put it in the Query. I also used OuterJoin/ExistJoin but nothing seems to work. please help.

  • 5400 Profile Picture
    7,162 on at

    Your table relation looks wrong to me please check my screen shot. after modifying table relation please add the query in view and check. It should work.

  • XSpy Profile Picture
    209 on at

    yep, i already solved it, it's a little typo in the relationship. sorry and thanks.

  • Verified answer
    Martin Dráb Profile Picture
    237,926 Most Valuable Professional on at

    Considering queries as black boxes and observing just returned data makes debugging unnecessary difficult, as you see.

    Instead, look at what SQL query did have you constructed. Look at the query string in debugger or call toString() on the root QueryBuildDataSource. If you don't see any problem there, share the query with us. (If you don't see all datasources, set fetch mode of child datasources to 1:1.)

  • Verified answer
    5400 Profile Picture
    7,162 on at

    Please check now it should work, I will suggest you please add first color related table in query and check. Then add size and check.  It could be issue with your join. Make sure you join correctly with data source.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans