Page 1 of 1

VLF-ONE Send To Excel

Posted: Sat May 20, 2017 3:28 am
by jyoung
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)

Code: Select all

mthroutine name(uSendtoXL) options(*REDEFINE)
#CMGApplicationManager.avFrameworkManager.avRecordTrace component(#COM_OWNER) event("uSendToXL")
endroutine
Shows the method is never getting invoked.
Capture.PNG
Capture.PNG (41.82 KiB) Viewed 8094 times

Re: VLF-ONE Send To Excel

Posted: Sat May 20, 2017 10:29 am
by MarkD
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.

Re: VLF-ONE Send To Excel

Posted: Sat May 20, 2017 11:17 am
by jyoung
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.

Re: VLF-ONE Send To Excel

Posted: Mon May 22, 2017 9:27 am
by MarkD
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.

Re: VLF-ONE Send To Excel

Posted: Mon May 22, 2017 11:18 pm
by jyoung
Thanks Mark.

Of course, since you mentioned it, I have to ask. :D

Any ideas on when the next EPC will be out?

Re: VLF-ONE Send To Excel

Posted: Tue May 23, 2017 8:48 am
by MarkD
Sometime in July I hope.