Temp table in release 5 forms

davmac1
Member Posts: 1,283
Release 5 supports temporary tables in forms.
I thought this would enable me to open a list form and then populate the table and display it, plus rebuild the table on the fly.
Through debug, I can tell it is inserting new records, but nothing shows up in the list form.
Has anyone used this new property and made a list form work with a temp table just like a normal table?
I thought this would enable me to open a list form and then populate the table and display it, plus rebuild the table on the fly.
Through debug, I can tell it is inserting new records, but nothing shows up in the list form.
Has anyone used this new property and made a list form work with a temp table just like a normal table?
David Machanick
http://mibuso.com/blogs/davidmachanick/
http://mibuso.com/blogs/davidmachanick/
0
Comments
-
Something like this should work.
TempItem."No." := 'My_ITEM_1'; TempItem.INSERT; TempItem."No." := 'My_ITEM_2'; TempItem.INSERT; FORM.RUNMODAL(Form::"Item List",TempItem);
0 -
This looks the same as prior to release 5.
So if I am going to change filters and delete and recreate the temp table, I am going to have to do that from a different form each time, then run the form with the temp table.
Currently, I have everything in one form where I am rebuilding the temp table based on filter changes on the form, but it won't allow the user to mark records, because it is doing the current record substitution to display the temp table records.
I was hoping for an all in one solution.
I guess I can try building the temp table once and then apply the various filters to it instead of rebuilding it each time.
Do you know what the sourcetabletemporary property does differently?David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
there is no documentation for it but basically you don't have to write any code on
triggerrs OnFindRecord and OnNextRecord.0 -
Hello,
How and where are you populating the table? I am using this new functionality and it works fine. I am populating the Rec table on the "OnOpenForm" trigger.
-- Alejandro --0 -
I have tried it on the OnOpenForm trigger - it inserts 6 records according to the debugger, but nothing shows.
I was not specifying Rec, but I changed the code to specifically use Rec - still see nothing on the list form.
Did you make any other changes?David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
No, nothing else. Do you have a filter on "SourceTableView" property? It should work.0
-
No filter - undefined.
I am going to try building this form from new.
I modified a form I had working in release 4 so I could let the user mark records. I got rid of all the old code for substituting Rec - maybe I missed something.David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
Actually it's not necessary to specify rec, just field names but, it is to remove the old references. Good luck.
-- Alejandro --0 -
Had to completely remove my commented out lines - then it worked.
Even empty code in the record retrieval triggers causes the normal actions not to take place.David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
davmac1 wrote:Release 5 supports temporary tables in forms.
I thought this would enable me to open a list form and then populate the table and display it, plus rebuild the table on the fly.
Through debug, I can tell it is inserting new records, but nothing shows up in the list form.
Has anyone used this new property and made a list form work with a temp table just like a normal table?
Its not really "new" functionality, just a different way than you did this in earlier versions.
in earlier versions of Navision you could pass a Temp var as a parameter to a FORM.RUNMODAL command in which case you didn't need to write any code on the OnNext and OnFind triggers.David Singleton0 -
davmac1 wrote:Had to completely remove my commented out lines - then it worked.
Even empty code in the record retrieval triggers causes the normal actions not to take place.
This was actually the First error that I officially logged with Navision as an error in Financials. I was trying to use a temp table in a form and back then there were no existing forms (like Location Qty) to copy, I had tried lots of things, and eventually commented them out to get back to normal and it all stopped working. The answer came back from Denmark "Read the manual (aka on line help)".
So if you read it literally it says "any code in this trigger replaces the built in functionality", and of course // is still code, just code that does nothing, so the run time simply sees that there is code there, so it does not run the built in NEXT and FIND functions. Its called Danglish I think.David Singleton0 -
"any code" also includes variables. I had removed all code, but left a variable definition. I ended up dropping the form to text where you can see evrything.David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
Is it possible to rebuild the contents of a form with SourceTableTemporary=True on the fly ?
I tried to fill up the rec in the OnAfterValidate trigger of a variable on the form, but after this Navision always tried to insert a new record (with the contents of my last record in the temptable).0
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