How to clear mark on Lookup form?

selece28
Member Posts: 316
Hi Nav masters,
I have a problems. I fill my Lookup form using records that i get with Mark.
But when the form shows, it have a Mark sign on the left side. How can i remove those Mark sign, and Put my cursor to the 1st record?
This is the example of my code:
Rec_Employee.MARKEDONLY(TRUE);
Frm_Employee.LOOKUPMODE := TRUE;
Frm_Employee.SETTABLEVIEW(Rec_Employee);
Frm_Employee.SETRECORD(Rec_Employee);
IF Frm_Employee.RUNMODAL = ACTION::LookupOK THEN BEGIN
Frm_Employee.GETRECORD(Rec_Employee);
VALIDATE("Requested By", Rec_Employee."No.");
END;
Thanks in advance
I have a problems. I fill my Lookup form using records that i get with Mark.
But when the form shows, it have a Mark sign on the left side. How can i remove those Mark sign, and Put my cursor to the 1st record?
This is the example of my code:
Rec_Employee.MARKEDONLY(TRUE);
Frm_Employee.LOOKUPMODE := TRUE;
Frm_Employee.SETTABLEVIEW(Rec_Employee);
Frm_Employee.SETRECORD(Rec_Employee);
IF Frm_Employee.RUNMODAL = ACTION::LookupOK THEN BEGIN
Frm_Employee.GETRECORD(Rec_Employee);
VALIDATE("Requested By", Rec_Employee."No.");
END;
Thanks in advance
______________
Regards,
Steven
Regards,
Steven
0
Answers
-
1) Position to the first record - use FINDFIRST or FIND('-') on the record before passing it to the form
2) If you do not see the marks, you will need to use temporary table, into which you insert the marked records and you will pass this temporary record to the form.0 -
Hi Kine,
I already try using temporary table but still cannot.
My code is like this: <Rec_Employee1 is temporary>
Rec_Employee.MARKEDONLY(TRUE);
Rec_Employee1.DELETEALL;
Rec_Employee1.COPY(Rec_Employee); // i try Transferfields also cannot
Rec_Employee1.CLEARMARKS;
Frm_Employee.LOOKUPMODE := TRUE;
Frm_Employee.SETTABLEVIEW(Rec_Employee1);
Frm_Employee.SETRECORD(Rec_Employee1);
IF Frm_Employee.RUNMODAL = ACTION::LookupOK THEN BEGIN
Frm_Employee.GETRECORD(Rec_Employee1);
VALIDATE("Requested By", Rec_Employee1."No.");
END;
How to do it?
Thanks in advance______________
Regards,
Steven0 -
problem is in:
Rec_Employee1.COPY(Rec_Employee); // i try Transferfields also cannot
COPY function doesn't copy records! It just copy filters and sorting, but not records. You need to go through all the records in a loop and insert them into the temporary.if Rec_Employee.FINDSET then repeat Rec_Employee1 := Rec_Employee; Rec_Employee1.INSERT; until Rec_Employee.NEXT=0;
(And I recommand to use name like TempRec_Employee or something like that with the Temp or Buffer in the name to clearly state, that the record is Temporary table).0 -
Hi Kine,
I already follow your instruction.
But now i have all records instead of the records that only i mark.
Weird...
I put my code in table (on lookup) and not in form, is it correct?
Thanks in advance______________
Regards,
Steven0 -
-
Hi Kine,
This all my code: <Rec_TempEmployee is the temporary table>
Rec_TempEmployee.DELETEALL;
Rec_Employee.MARKEDONLY(TRUE); //i found 3 records
IF Rec_Employee.FINDSET THEN //i also try Find('-'), cannot too
REPEAT
Rec_TempEmployee := Rec_Employee;
Rec_TempEmployee.INSERT;
UNTIL Rec_Employee.NEXT = 0;
Frm_Employee.LOOKUPMODE := TRUE;
Frm_Employee.SETTABLEVIEW(Rec_TempEmployee);
Frm_Employee.SETRECORD(Rec_TempEmployee);
IF Frm_Employee.RUNMODAL = ACTION::LookupOK THEN BEGIN
Frm_Employee.GETRECORD(Rec_TempEmployee);
VALIDATE("Requested By", Rec_TempEmployee."No.");
END;
Is there anything i miss?
Thanks in advance______________
Regards,
Steven0 -
May be that problem is in the way of calling the form. Better will be to use this:
Rec_TempEmployee.DELETEALL; Rec_Employee.MARKEDONLY(TRUE); //i found 3 records IF Rec_Employee.FINDSET THEN //i also try Find('-'), cannot too REPEAT Rec_TempEmployee := Rec_Employee; Rec_TempEmployee.INSERT; UNTIL Rec_Employee.NEXT = 0; IF FORM.RUNMODAL(0,Rec_TempEmployee) = ACTION::LookupOK THEN BEGIN VALIDATE("Requested By", Rec_TempEmployee."No."); END;
0 -
Wow Thanks Kine, My problems solved______________
Regards,
Steven0
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