Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

Searching for D.o.B. for specific date range

(0) ShareShare
ReportReport
Posted on by 15

Hi,

I am looking to create an Advanced Find view that shows me a list of animals which are turning a certain age in the next week.

I want a view to show any animal that will turn 20 years old in the next week. I have tried using the Last X Weeks or Last X Months search options, but are limited to a figure much lower than that required to search over 20 years.

Can anyone come up with a suggestion, or an alternative?

Thanks in advance

Matty.

Categories:
  • MattyH Profile Picture
    MattyH 15 on at
    RE: Searching for D.o.B. for specific date range

    Hi,

    Thanks, makes total sense now.

    Matty.

  • Suggested answer
    LuHao Profile Picture
    LuHao 40,876 on at
    RE: Searching for D.o.B. for specific date range

    Hi Matty,

    Note that after setting the filter for the view to more than 100 weeks, this view cannot be edited in D365 by the way in your screenshot.

    You could first enter the view then edit this view by advanced find. But if you edit it in D365, you can't make the number of weeks exceed 100.

    1. Go to the view and click the Advanced Find button in the top right corner.

    8272.4.PNG

    2. You will still see this warning and click OK. Here you need to click about 6 times OK, because this warning will pop up repeatedly. Then you will enter the view editing interface.

    3482.2.PNG

    3. Click Details to start editing. It still does not support more than 100 weeks.

    2844.3.PNG    8272.4.PNG

    Therefore, I recommend that you first edit the view completely in the advanced find (except for the number of weeks, set to 100 first), and finally enter XrmToolBox to change the number of weeks to 1043.

  • MattyH Profile Picture
    MattyH 15 on at
    RE: Searching for D.o.B. for specific date range

    Hi,

    I have just tried to build the view, as per your instructions, and I am getting the following warning.

    DOB.JPG

    I am unable to open the required view.

    Can you help?

    Thanks

    Matty.

  • MattyH Profile Picture
    MattyH 15 on at
    RE: Searching for D.o.B. for specific date range

    Hi Lu,

    Thanks, this is exactly the answer I was looking for. I will give it a try.

    Matty.

  • Verified answer
    LuHao Profile Picture
    LuHao 40,876 on at
    RE: Searching for D.o.B. for specific date range

    Hi Matty,

    In D365, by default we can only set up filters for the last 100 weeks/months/years.

    If we want to set more than the last 100 weeks, we can use View Designer of XrmToolBox to edit the view.

    This is the download link for XrmToolBox: https://www.xrmtoolbox.com/

    If you want to filter animals that are 20 years old next week, then the filter is that the birthday is last 1042~1043 weeks. ( (365*20+5)/7=1043.5 )

    The following is the step process:

    1. We create a personal view with two filters for the birthday of the last 100 weeks and older than 100 weeks. (Here I take the Account as an example.)

    7181.4.PNG

    2. After we download and unzip XrmToolBox, open it and connect it to your D365 organization. Install View Designer and FetchXML Builder in the plugins store.

    5025.2.PNG

    3. Open View Designer and click Open to select the corresponding entity and the view we just created.

    4477.3.PNG

    4. Click Edit Query to enter FetchXML Builder. 

    Find operator="last-x-weeks" value="100" and operator="olderthan-x-weeks" value="100" ,

    change them to "last-x-weeks" value="1043" and operator="olderthan-x-weeks" value="1042".

    After changing, click OK and then click Return FetchXML.

    7181.4.PNG    6177.5.PNG    3426.6.PNG

    5. Click Save and the click Publish. Back in D365, this view will filter out the animals whose birthday is last 1042~1043 weeks.

    5047.7.PNG

  • MattyH Profile Picture
    MattyH 15 on at
    RE: Searching for D.o.B. for specific date range

    It seems, on our system anyway, that I am limited to searching back 100 weeks or 100 months.  Is this fixed, or can it be altered?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans