Discussions
Activity
Best Of...
Sign In
·
Register
Home
›
NAV/Navision Classic Client
Howdy, Stranger!
It looks like you're new here. Sign in or register to get started.
Sign In
Register
Quick Links
Categories
Recent Discussions
Activity
Best Of...
Unanswered
Categories
All Categories
73
General
73
Announcements
66.6K
Microsoft Dynamics NAV
18.6K
NAV Three Tier
38.4K
NAV/Navision Classic Client
3.6K
Navision Attain
2.4K
Navision Financials
115
Navision DOS
854
Navision e-Commerce
1K
NAV Tips & Tricks
772
NAV Dutch speaking only
615
NAV Courses, Exams & Certification
2K
Microsoft Dynamics-Other
1.5K
Dynamics AX
298
Dynamics CRM
109
Dynamics GP
10
Dynamics SL
1.5K
Other
993
SQL General
384
SQL Performance
34
SQL Tips & Tricks
34
Design Patterns (General & Best Practices)
Architectural Patterns
10
Design Patterns
5
Implementation Patterns
53
3rd Party Products, Services & Events
1.7K
General
1.1K
General Chat
1.6K
Website
79
Testing
1.2K
Download section
23
How Tos section
259
Feedback
12
NAV TechDays 2013 Sessions
13
NAV TechDays 2012 Sessions
merge 2 dates into date filter field
fmhigue
Member
Posts:
290
2008-06-19
edited 2008-06-26
in
NAV/Navision Classic Client
I got w dates:
Starting date - Date
Ending Date - Date
I have another field Date Filter. I want to put those into that one because I want to use it to get sales from Value Entry table.
Any ideas?
0
Comments
DaveT
Member
Posts:
1,039
2008-06-19
Hi fmhigue
use
setrange( "Date filter", "strating date", "ending date" );
setfilter( "date filter", format("starting date")+'..'+format("ending date"));
also works
Dave Treanor
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
0
fmhigue
Member
Posts:
290
2008-06-19
Hi Dave T:
Sorry I did not explain myself correctly.
Date Filter I will use it as parameter on Qty Sold field. That is a flow field from Value Entry.
Let me write it down:
Qty Sold:
Method: Sum
Table: Value Entry
Field: Invoiced Quantity
Table Filter:
Posting Date=FIELD(Starting Date)
Note:
Instead of Starting Date I want Date filter in here.
Item Ledger Entry Type=CONST(Sale),
Location Code=FIELD(Location Code),
Item No.=FIELD(Item No.),
Source No.=FIELD(Customer No.)))
I hope I did myself clear this time
0
DaveT
Member
Posts:
1,039
2008-06-19
Hi fmhigue,
Ok, if you set
Posting Date=FIELD(Date Filter)
and declare the "Date Filter" as type datefilter it will work when you use the setrange or setfilter as I said and calcfields( "Qty Sold" ).
Look at field 72 Sales (Qty.) on the item table for how it treats this as standard.
Hope this clear it up for you.
Dave Treanor
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
0
fmhigue
Member
Posts:
290
2008-06-19
Dave T:
It is working now. I appreciate your help.
I just dont get how Date Filter knows it should use Starting and Expiration date.
0
DaveT
Member
Posts:
1,039
2008-06-19
Hi fmhigue,
Datefilter is a special type of field and Nav knows how to treat it.
It look at the filter set on the variable, instead of the value, and appies the filter to what it looks up.
i.e. if you look at date filter variable, the value is not set but the filter is set. You can see what the filter is by using the getfilter command.
Glad to help
Dave Treanor
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
0
fmhigue
Member
Posts:
290
2008-06-19
Date Filter is taking since the beggining of the company to today.
I want date filter to take starting date.. expiration date.
I setup Date Filter - Date - FlowFilter
0
DaveT
Member
Posts:
1,039
2008-06-19
Hi fmhigue,
:-k :-k
Check that the filter is set correctly... try using
MESSAGE( GETFILTER( "Date Filter" ) );
to see how it is set
Dave Treanor
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
0
fmhigue
Member
Posts:
290
2008-06-26
It is working now
0
Sign In
or
Register
to comment.
Comments
use
setrange( "Date filter", "strating date", "ending date" );
setfilter( "date filter", format("starting date")+'..'+format("ending date"));
also works
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
Sorry I did not explain myself correctly.
Date Filter I will use it as parameter on Qty Sold field. That is a flow field from Value Entry.
Let me write it down:
Qty Sold:
Method: Sum
Table: Value Entry
Field: Invoiced Quantity
Table Filter:
Posting Date=FIELD(Starting Date)
Note:
Instead of Starting Date I want Date filter in here.
Item Ledger Entry Type=CONST(Sale),
Location Code=FIELD(Location Code),
Item No.=FIELD(Item No.),
Source No.=FIELD(Customer No.)))
I hope I did myself clear this time
Ok, if you set
Posting Date=FIELD(Date Filter)
and declare the "Date Filter" as type datefilter it will work when you use the setrange or setfilter as I said and calcfields( "Qty Sold" ).
Look at field 72 Sales (Qty.) on the item table for how it treats this as standard.
Hope this clear it up for you.
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
It is working now. I appreciate your help.
I just dont get how Date Filter knows it should use Starting and Expiration date.
Datefilter is a special type of field and Nav knows how to treat it.
It look at the filter set on the variable, instead of the value, and appies the filter to what it looks up.
i.e. if you look at date filter variable, the value is not set but the filter is set. You can see what the filter is by using the getfilter command.
Glad to help
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
I want date filter to take starting date.. expiration date.
I setup Date Filter - Date - FlowFilter
:-k :-k
Check that the filter is set correctly... try using
MESSAGE( GETFILTER( "Date Filter" ) );
to see how it is set
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html