This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
In VLF-ONE you can get a CSV from an instance list via the "Send To MS-Excel" menu item.
How is VLF-ONE doing this?
I have a custom instance list where I need to customize the excel file.
Are you doing something with #PRIM_WEB.HttpRequest and setting the content and headers?
I found the uSendToXL method to redefine but don't really know where to go from here. When I try to redefine the uSendToXL method it never gets called.
Thanks,
Joe
Edit
Tracing the method (uses a custom "application" aka framework manager)
You need to add your own selection option to initiate the send.
In the current VLF version uSendtoXL does not get invoked.
Regarding the HTTP part - see shipped Upload Download example 4.
Client reusable part is DF_T68H4O, server module is DF_T68DSO - routine uMakeCSVFileAsResp.
We also have a new untested example to ship in the next version that makes and displays CSV data entirely on the client.
Let us know if you need that an we can post that code.
If I need to add my own selection, meaning another button right, the user will have two options to download the data. My new button and the built in VLF menu item.
That also means that on a different list, the user has a different way of downloading the data as well, the VLF menu item instead of a custom button. I could see this being confusing for the user as the interface is not consistent.
So there is no way to hook into to the menu item that is already there?
Edit: I just recalled I could disable it in the framework tool. But I would still rather the UI be consistent.
All understood. In the next version (EPC141034) your overwritten uSendtoXL method will be invoked when the VLF default button is used.
So if you put your code in uSendtoXL now, and invoke it from your own button (hiding the VLF button) then you can later remove your button.
We also changed this area quite substantially to make sure what went into the spreadsheet exactly matches what the user is seeing.