TempRec.MARKEDONLY Error using SQL

loginov
Member Posts: 12
Hi!
Help please. There is a problem
:
We have a temporary record. There is also a form for this record. When i try to set markedonly filter (not important from C/Al o from intarface) there is an error 1 in module 43. If using the Native DB option, error is absent, my code works excelent. But i need to do this for SQL...
Thanks
Help please. There is a problem

We have a temporary record. There is also a form for this record. When i try to set markedonly filter (not important from C/Al o from intarface) there is an error 1 in module 43. If using the Native DB option, error is absent, my code works excelent. But i need to do this for SQL...
Thanks
With respect, Yegor Loginov
0
Comments
-
Check, if you are not using some long identifier (variable name or something)... :?:0
-
I have succesfully tested on SQL 3.60:
- temp rec
- runing a form on this rec
- setting some marks
- using markedonly filter
is there anything else special that sou set (or change in code)®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0 -
Thank You, kine! But effect is the same.
I'd made all field indetifiers of this table like F1...F20, error still apears.With respect, Yegor Loginov0 -
-
RobertMo
Yes, the situation is deeper...
- i'm not able to use FORM.RUN, becouse of i need to identify form first
- on init function i do my needs and also do TempRec identification, for example:
f.InitMyForm(Some Parameters...., SourceForTempRec);
if f.RUNMODAL = Action::LookupOK then
f.GetMyTempRec(SourceForTempRec);
- Rec of my form is always empty, OnFind and OnNext are like followed:
OnFindRecord(Which : Text[1024]) : Boolean
TempRec.COPY(Rec);
Found := TempRec.FIND(Which);
TempRec.CALCFIELDS(f9, f10, f11, f15, f12, f16, f17);
Rec := TempRec;
EXIT(Found);
OnNextRecord(Steps : Integer) : Integer
TempRec.COPY(Rec);
ResultSteps := TempRec.NEXT(Steps);
TempRec.CALCFIELDS(f9, f10, f11, f15, f12, f16, f17);
Rec := TempRec;
EXIT(ResultSteps);
- marks are sends to SourceForTempRec from Rec in function GetMyTempRec like SourceForTempRec.COPY(Rec);
There is my error if use MARKEDONLY on form or on SourceForTempRec in C/AL. And it works excellent with Native DB option.With respect, Yegor Loginov0 -
What do you want to do? What is the meaning? It seems for me too complicated.0
-
kine
I want to make a form for selecting items for invoice. The way of getting my items is collecting them in some buffer table with several FlowFields. The base of buffer table is some Ledger Entry table. In my case buffer table is my TempRec. There are some different situations of selecting. So, i do not want to make special form for each of them, it's not prity (but there is the way of solving my problem). I want to mark some strings in seleting form and paster followed values to invoice after form closing.
To test my problem quckly you can use Form 583 XBRL Taxonomy Line. In original wariant MARKEDONLY does not works correctly on this form (using SQL). With some code correction you can get my error too.With respect, Yegor Loginov0 -
can you try to use some field instead of markedonly. maybe even add new field "MyMarkedOnly" boolean on underlaying table (32?).
instead of rec.mark, you set the field to true.
instead of markedonly, you setrange on this field.®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0 -
It's one of the ways. I'd thinked about it. But in this case user'll see other functionality than one in whole application. In my mind, it's not right from Microsoft professional point of view
.
With respect, Yegor Loginov0 -
Well you might be right. But this MarkedOnly is more or less seen only in Navision (not other MS)...
and a boolean that can be filtered by can also look as standard (like Open on Entries records)
and the end users ususally don't even notice that. they don't care if it works
but it's your choice...®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0 -
Thank You, RobertMo. I hoped to find a way of solving my problem and make a workable code :oops: . It's imposible that nobody looks this problem before... there is a lot of situations where it has a place.With respect, Yegor Loginov0
-
There some example, how you can use some buffer table (in this case table no. 3) for selecting records (in this case from table 4). There are two forms, first have only one button which start example, second is table, where you can filter, select etc.... after OK or Cancel is selection showed from first form. Tested on 3.70 SQL...
OBJECT Form 90000 t1 { OBJECT-PROPERTIES { Date=12.05.04; Time=[ 8:29:20]; Modified=Yes; Version List=; } PROPERTIES { Width=6270; Height=3080; } CONTROLS { { 1000000000;CommandButton;1980;1210;2200;550; CaptionML=ENU=Run test; OnPush=BEGIN //Fill temp table with data from Currency. Buffer is table no. 3 Full.FIND('-'); REPEAT tmp.Code := Full.Code; tmp.INSERT; UNTIL Full.NEXT=0; CLEAR(F); F.SetParam(tmp); //send data into form F.LOOKUPMODE := TRUE; IF F.RUNMODAL = ACTION::LookupOK THEN //show form F.GetParam(tmp); //get data from form IF tmp.FIND('-') THEN //show selected data REPEAT MESSAGE('%1',tmp); UNTIL tmp.NEXT=0; END; } } CODE { VAR tmp@1000000000 : TEMPORARY Record 3; F@1000000001 : Form 90001; Full@1000000002 : Record 4; i@1000000003 : Integer; BEGIN END. } } OBJECT Form 90001 t2 { OBJECT-PROPERTIES { Date=12.05.04; Time=[ 7:52:10]; Modified=Yes; Version List=; } PROPERTIES { Width=15050; Height=6710; Editable=No; TableBoxID=1000000000; SourceTable=Table3; OnInit=BEGIN Rec.COPY(tmp); END; OnFindRecord=VAR F@1000000000 : Boolean; BEGIN tmp.COPY(Rec); F := tmp.FIND(Which); Rec := tmp; EXIT(F); END; OnNextRecord=VAR StepsF@1000000000 : Integer; BEGIN tmp.COPY(Rec); StepsF := tmp.NEXT(Steps); Rec := tmp; EXIT(StepsF); END; OnAfterGetCurrRecord=BEGIN Rec := tmp; END; } CONTROLS { { 1000000000;TableBox;220 ;220 ;14610;5500 ;HorzGlue=Both; VertGlue=Both } { 1000000001;TextBox;0 ;0 ;1700 ;0 ;ParentControl=1000000000; InColumn=Yes; SourceExpr=Code } { 1000000002;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000001; InColumnHeading=Yes } { 1000000003;TextBox;0 ;0 ;1700 ;0 ;ParentControl=1000000000; InColumn=Yes; SourceExpr="Due Date Calculation" } { 1000000004;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000003; InColumnHeading=Yes } { 1000000005;TextBox;0 ;0 ;1700 ;0 ;ParentControl=1000000000; InColumn=Yes; SourceExpr="Discount Date Calculation" } { 1000000006;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000005; InColumnHeading=Yes } { 1000000007;TextBox;0 ;0 ;2200 ;0 ;ParentControl=1000000000; InColumn=Yes; SourceExpr="Discount %" } { 1000000008;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000007; InColumnHeading=Yes } { 1000000009;TextBox;0 ;0 ;4400 ;0 ;HorzGlue=Both; ParentControl=1000000000; InColumn=Yes; SourceExpr=Description } { 1000000010;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000009; InColumnHeading=Yes } { 1000000011;CheckBox;0 ;0 ;1700 ;0 ;ParentControl=1000000000; InColumn=Yes; ShowCaption=No; SourceExpr="Calc. Pmt. Disc. on Cr. Memos" } { 1000000012;Label ;0 ;0 ;0 ;0 ;ParentControl=1000000011; InColumnHeading=Yes } { 1000000013;CommandButton;7790;5940;2200;550; HorzGlue=Right; VertGlue=Bottom; Default=Yes; PushAction=LookupOK; InvalidActionAppearance=Hide } { 1000000014;CommandButton;10210;5940;2200;550; HorzGlue=Right; VertGlue=Bottom; Cancel=Yes; PushAction=LookupCancel; InvalidActionAppearance=Hide } { 1000000015;CommandButton;12630;5940;2200;550; HorzGlue=Right; VertGlue=Bottom; PushAction=FormHelp } } CODE { VAR tmp@1000000000 : TEMPORARY Record 3; PROCEDURE SetParam@1000000000(VAR T@1000000000 : Record 3); BEGIN T.FIND('-'); REPEAT tmp := T; tmp.INSERT; UNTIL T.NEXT=0; END; PROCEDURE GetParam@1000000001(VAR T@1000000000 : Record 3); BEGIN T.DELETEALL; tmp.FIND('-'); REPEAT T := tmp; T.INSERT; UNTIL tmp.NEXT=0; END; BEGIN END. } }
0 -
Well, kine. Now try to mark some strings in a form and use
F.GetParam(tmp);
// my Code
tmp.MARKEDONLY(TRUE); :?:
// end my Code
IF tmp.FIND('-') THEN
...but in GetParam You must to send marks from Rec to tmp beforeWith respect, Yegor Loginov0 -
I don't, because when you mark rec in form and select Marked only, only marked records are send back into form 1...0
-
Yes, it works with 3.70 SQL... But there is an error using MARKEDONLY on form with 3.60 SQLWith respect, Yegor Loginov0
-
Oh, sorry, I tested on 3.70 SQL and 3.60 native...
What about Technical upgrade? Which HotFix you are using for 3.60 SQL?0 -
I use the last i have: from 10.03.04 - no effect.
So, will write to tecnical support....
Thank You.With respect, Yegor Loginov0
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