Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

findOrCreateRange() in date range

Posted on by 5,901

Dear All,

I saw below code any many queries in for date range :

SysQuery::findOrCreateRange(this.queryBuildDataSource(),
fieldNum(ProdTable, FinishedDate)).value(SysQuery::range(12\01\2017, 12\31\2017);

Can you please let me know how it's work findOrCreateRange() in date range.
Please give me more shed on this.

Thanks!

Arpan

*This post is locked for comments

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: findOrCreateRange() in date range

    Thanks Sukrut

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: findOrCreateRange() in date range

    Thanks Sukrut and Hakim,

    In this case it will create a default range like 01-01-1900.. something right?

    So, it's return all records.

    correct?

    Arpan

  • Mahmoud Hakim Profile Picture
    Mahmoud Hakim 17,887 on at
    RE: findOrCreateRange() in date range

    I  agree with Sukrut as he said 'In that case value is going to be blank and the report will filter all data'.

    and this is the benefit for create

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: findOrCreateRange() in date range

    Hi Sukrut,

    As you mentioned class ""AssetBalanceReportColumnsDP" i go through that.

    As i understand :

    Picture 01:

    5287.A4.png

    Picture 02:

    5287.A4.png

    If User put values in Book then it came to DP class through Contarct class and value will stored in assetBookID.
    then in findOrCreateRange(...).value(assetBookId) is passed.

    So, here one thing is clear it will find range (findOrCreateRange()) based on value eg. assetBookId. i.e OK.

    Note : Suppose if i NOT put value in Book in dialog.

    Then how findOrCreateRange(...).Value( ??) will work ?    (refer Pic 02)

    This is my question.

    Please give me more shed on this.

    Thanks!

    Arpan 

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: findOrCreateRange() in date range

    thanks Sukrut

    i will go through and get back to you

    Arpan

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: findOrCreateRange() in date range

    I am not forcing you to do it. You give answer so i am asking for example.

    simple

    ,Untill unless if i not understand.

  • Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    RE: findOrCreateRange() in date range

    The same as we explained above, because it doesn't matter where it is.

    Use cross-references if you want to find examples in the standard application; you don't me to do it for you.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans