Modify sorting code
Agnethef
Member Posts: 18
Hi,
This report (see below) is used when we need a list of contact persons who are not in a specific marketing group.
How do I modify this code to make it select those contact person who are in specific marketing group.
I must be very simple. However, I am new to this and is still learning.
Thank you very much for any help.
Documentation()
Contact - OnPreDataItem()
Contact - OnAfterGetRecord()
IF CheckForGruppe(Contact, Gruppe) THEN
CurrReport.SKIP;
KontCtr := 0;
Contact - OnPostDataItem()
CheckForGruppe(Emne : Record Contact;Gruppe : Code[10]) Ans : Boolean
IF NOT Contact."Exclude from Segment" THEN
BEGIN
Kontakt.SETFILTER(Kontakt."Company No.",Contact."No.");
Antal := Kontakt.COUNT;
IF Antal = 0 THEN
Ans := FALSE
ELSE
BEGIN
MkGrupOK := FALSE;
IF Kontakt.FIND('-') THEN
REPEAT
IF Markedsgruppetilknytning.GET(Kontakt."No.", Gruppe) THEN
BEGIN
Ans := TRUE;
MkGrupOK := TRUE;
EXIT;
END
ELSE
Ans := FALSE;
UNTIL Kontakt.NEXT = 0;
Ans := FALSE
END;
END
ELSE
Ans := FALSE;
KontaktiGruppe(Kontaktpers : Record Contact;Gruppe : Code[10]) Ans : Boolean
IF NOT Kontakt."Exclude from Segment" THEN
BEGIN
IF Markedsgruppetilknytning.GET(Kontaktpers."No.", Gruppe) THEN
Ans := TRUE
ELSE
Ans := FALSE;
END
ELSE
Ans := FALSE;
This report (see below) is used when we need a list of contact persons who are not in a specific marketing group.
How do I modify this code to make it select those contact person who are in specific marketing group.
I must be very simple. However, I am new to this and is still learning.
Thank you very much for any help.
Documentation()
Contact - OnPreDataItem()
Contact - OnAfterGetRecord()
IF CheckForGruppe(Contact, Gruppe) THEN
CurrReport.SKIP;
KontCtr := 0;
Contact - OnPostDataItem()
CheckForGruppe(Emne : Record Contact;Gruppe : Code[10]) Ans : Boolean
IF NOT Contact."Exclude from Segment" THEN
BEGIN
Kontakt.SETFILTER(Kontakt."Company No.",Contact."No.");
Antal := Kontakt.COUNT;
IF Antal = 0 THEN
Ans := FALSE
ELSE
BEGIN
MkGrupOK := FALSE;
IF Kontakt.FIND('-') THEN
REPEAT
IF Markedsgruppetilknytning.GET(Kontakt."No.", Gruppe) THEN
BEGIN
Ans := TRUE;
MkGrupOK := TRUE;
EXIT;
END
ELSE
Ans := FALSE;
UNTIL Kontakt.NEXT = 0;
Ans := FALSE
END;
END
ELSE
Ans := FALSE;
KontaktiGruppe(Kontaktpers : Record Contact;Gruppe : Code[10]) Ans : Boolean
IF NOT Kontakt."Exclude from Segment" THEN
BEGIN
IF Markedsgruppetilknytning.GET(Kontaktpers."No.", Gruppe) THEN
Ans := TRUE
ELSE
Ans := FALSE;
END
ELSE
Ans := FALSE;
0
Comments
-
[Topic moved from 'NAV 2009' forum to 'NAV/Navision' forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
-
Dear Yaroslav,
Thank you for the reply. Unfortunately it did not work.
Kind regards,
Agnethef0 -
The problem has been solved.
Thanks.
Agnethef0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 250 Dynamics CRM
- 102 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions