Temporary Tables

aarjita
Member Posts: 6
Hi All,
In a customization,I have used a temporary table whose data is viewed thru a form.on this table when i try to execute functions like FIND,COUNT they do not give the expected result.I wish to know more about temporary tables and transactions done thru them.
Secondly,while displaying the data i have distinguished consecutive records by changing the forecolor property dynamically.But when i click on a record say 3rd record,it changes its color to the color record 2 is and the record 2 changes its color to what record 3 had earlier.How can this be stopped?
Thanks in advance.
Arjita
In a customization,I have used a temporary table whose data is viewed thru a form.on this table when i try to execute functions like FIND,COUNT they do not give the expected result.I wish to know more about temporary tables and transactions done thru them.
Secondly,while displaying the data i have distinguished consecutive records by changing the forecolor property dynamically.But when i click on a record say 3rd record,it changes its color to the color record 2 is and the record 2 changes its color to what record 3 had earlier.How can this be stopped?
Thanks in advance.
Arjita
0
Comments
-
Concerning Colors, could you please copy here the code you made for the change ? Is this code in the OnFormat Trigger ?0
-
When you use a temporary record variable, the variable is basically an empty object that is stuctured like the table that you base the variable on. There are no records in a temporary record variable, it is completely empty until you write the records yourself.
So if you have 25000 records in your Item table, and 2500 begin with the letter B, then when you create a temporary Item variable, and filter it on *B*, you will find no records, because it is an empty object in memory that needs to be filled before you can display anything.0 -
Hi Daniel,
Thanks a lot for your response.Well in my code,I copied data from a record variable(not temporary table) through COPYFILTERS.Suppose,tmptable is the temp. table and myRec is the record variable.I filtered myRec n then copied it to tmpTable as
tmpTable.COPYFILTERS(myRec);
For me this statement does not give the desired result.Further,when I execute tmpTable.COUNT,tmpTable.FIND, after tranferring data,count gives value 0.Please correct me if I am wrong.
Thanks
Arjita0 -
Hi,
Regarding color change,I have written the code in OnFormat trigger of a control on the form.I want to differentiate two vendors of the same item.So I have written the code as-
IF VendorNo<>xrec.VendorNo THEN
CurrForm.ItemNo.UPDATEFORECOLOR(255);
While running the form,the vendors are differentiated as one in red and other one in black.But as soon as I select any of the vendors,if it is in red,it changes color to black and the neighboring records change their color to black.This change in the color scheme is reflected as all red into black and all black into red.Please provide me more assistance on this.
Thanks
Arjita0 -
1. COPYFILTERS : this copy only filters (as the name says), not Table Datas !!! If you need to copy datas between real and temporally tables, you need to make such code :
RealTable.FIND('-'); REPEAT TmpTable := RealTable; TmpTable.INSERT; UNTIL RealTable.NEXT = 0
2. Colors : doesn't work with xRec, that why you have this "blinking colors" effect.
One suggestion is to have a new field in your table to identify clearly the "vendor changes" and use this field as condition for the UPDATEFORECOLOR in the trigger OnFormat0
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