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 :
Microsoft Dynamics GP (Archived)

Smartlist builder Date Issue

(0) ShareShare
ReportReport
Posted on by 130

Dear,

I have created an SQL view and added a smartlist..

the following is the view:

SELECT CONVERT(VARCHAR(10), C.CREATDDT, 103) AS [CREATION DATE], P.PRCSHID AS [PRICE SHEET], P.LINKCODE AS [CUSTOMER ID],
C.CUSTNAME AS [CUSTOMER NAME], C.STMTNAME AS [CUSTOMER ARABIC DESC], C.SLPRSNID AS SALESPERSON, C.CUSTDISC / 100 AS [TRADE DISCOUNT],
C.USERDEF1 AS [ROUTING DAY],
CASE D .DSCTYPE WHEN 1 THEN 'INV Range %' WHEN 2 THEN 'INV Monthly %' WHEN 3 THEN 'INV Fixed' WHEN 4 THEN 'RCP Monthly %' END AS [Discount Type]
FROM dbo.RM00500 AS P INNER JOIN
dbo.RM00101 AS C ON P.LINKCODE = C.CUSTNMBR INNER JOIN
dbo.DSC00101 AS D ON C.CUSTNMBR = D.CUSTNMBR

As you can see, i have converted the "created date" to a date format (it's highlighted)..

in the smartlist, i have also added a calculated field that converts the "Created Date" as follows:

 CONVERT(VARCHAR(10), {*NEWLY_CREATED_CUSTOMERS:CREATION DATE} , 103)

But, as a result, the smartlist is not showing any data, only the column "creation date" is showing "00/00/0000".

So please could someone help me or show me what may be missing?

Thank you in advance,

Mona

 

 

*This post is locked for comments

I have the same question (0)
  • Victoria Yudin Profile Picture
    22,768 on at
    Re: Smartlist builder Date Issue

    Mona,

    I typically find that there is no need to convert dates in my SQL views for SmartList Builder.  Have you tried simply using the CREATDDT as is, without any conversions?

  • mona kazzi Profile Picture
    130 on at
    Re: Smartlist builder Date Issue

    Thank you Victoria for the reply.

    I actually did try using it as is.. but the problem is that in the smartlist it's viewed as a string.

    which prevents the user from being able to search by "Creation Date".

    I thought that by converting it in the calculated field they'd be able to filter the data just like in the sample smartlists.. It didn't work (also displayed dates in this format "00/00/0000")

    then i read that i must also convert the date in the view, that's why I did it.

    Any other suggestions?

  • Verified answer
    Victoria Yudin Profile Picture
    22,768 on at
    Re: Smartlist builder Date Issue

    Mona,

    I have not seen SmartList Builder not recognize a date field properly yet.  What version and build of GP are you on?  Using GP 2010 R2 (build 1752) I just tested with the following view and it worked properly.  

     

    create view view_Created_Date_Test

    as

    select CUSTNMBR [Customer Number], CUSTNAME [Customer Name], CREATDDT [Created Date]

    from RM00101

    go

    grant select on view_Created_Date_Test to dyngrp

     

    When this comes into SmartList Builder, it is recognized as a date:

  • mona kazzi Profile Picture
    130 on at
    Re: Smartlist builder Date Issue

    I have just removed all the formatting (conversions) and tried it.. It worked! you are 100% right!!

    I am ashamed!! :$

    Thank you and please excuse me for bothering you

  • Victoria Yudin Profile Picture
    22,768 on at
    Re: Smartlist builder Date Issue

    No problem at all!  I am glad it worked, I was worried there is a service pack out there that was going to break all my SmartLists.  :-)

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans