SETSELECTIONFILTER and Total Amount

navuser1
Member Posts: 1,334
Dear all,
How to use the SETSELECTIONFILTER function to sum up of a columnar value ??
Scenario
How to use the SETSELECTIONFILTER function to sum up of a columnar value ??
Scenario
Now or Never
0
Comments
-
Which form is this?
You can add a button and write:
MySumVar := 0;
CurrForm.SETSELECTIONFILTER(Rec);
IF FIND('-') THEN REPEAT
MySumVar += Amount;
UNTIL NEXT = 0;
You cannot use CALCSUMS.0 -
i wonder if he wants the sum to be calculated after pressing a button (code of kapamarou in OnPush() ) or if he wants to have the sum calculated in realtime during lines selection (not suggested). in the 2nd option, you should try some other form trigger, and review kapamarou code in order to not use "rec" variable but another variable pointing to the same table (to avoid filer problems)0
-
Belias wrote:i wonder if he wants the sum to be calculated after pressing a button (code of kapamarou in OnPush() ) or if he wants to have the sum calculated in realtime during lines selection (not suggested). in the 2nd option, you should try some other form trigger, and review kapamarou code in order to not use "rec" variable but another variable pointing to the same table (to avoid filer problems)
generic Solution is in my mind for the 1st option. But I want to work for the 2nd Option.
Which Trigger should I try ??? :-k :-k
BTW Thnx to both :thumbsup:Now or Never0 -
navuser1 wrote:Belias wrote:i wonder if he wants the sum to be calculated after pressing a button (code of kapamarou in OnPush() ) or if he wants to have the sum calculated in realtime during lines selection (not suggested). in the 2nd option, you should try some other form trigger, and review kapamarou code in order to not use "rec" variable but another variable pointing to the same table (to avoid filer problems)
generic Solution is in my mind for the 1st option. But I want to work for the 2nd Option.
Which Trigger should I try ??? :-k :-k
BTW Thnx to both :thumbsup:0 -
Faced problem in OnAfterGetRecord(); :roll: :roll:Now or Never0
-
You should try other triggers. What you are trying to achieve is a bit more complicated than the Gen. Journal form (you should look at this to get an idea from the balance text boxes). But as Belias said, this "automatic" option should better be avoided.0
-
kapamarou wrote:You should try other triggers. What you are trying to achieve is a bit more complicated than the Gen. Journal form (you should look at this to get an idea from the balance text boxes). But as Belias said, this "automatic" option should better be avoided.
Suppose I'm using Sales Journal Form where many entries are there. A TextBox will show us the sum calculated on the Basis of Lines Selection. The sum is nothing but the Nos. of Amount fields Total.Now or Never0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions