VLF question re. GetCurrentInstance and #vf_lw002

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.
Post Reply
User avatar
HMJust
Posts: 51
Joined: Wed May 11, 2016 7:23 pm
Contact:

VLF question re. GetCurrentInstance and #vf_lw002

Post by HMJust » Tue Aug 30, 2016 11:58 pm

Hello everyone

I work on a VLF solution but have been unable to find the documentation for the manager objects that are being used. Specifically I have a bug in my solution where I have an instance list and call

Define_Com Class(#vf_sw100) Name(#avFrameworkManager)
Define_Com Class(#vf_lw002) Name(#avListManager) Reference(*Dynamic)
...
#avListManager.GetCurrentInstance Visualid2(#VARNR) Nkey1(#LISTCOUNT) Nkey2(#OPSNR) Nkey3(#EANTAL) Nkey4(#OANTAL) Akey1(#LEVNR) Akey2(#LKORT) Akey3(#ART)

and in one case I get a value in #OPSNR while in another, I don't. And I am pretty sure I set the value when I updated the instance list

#avListManager.BeginListUpdate
#avListManager.ClearList
...
#avListManager.AddtoList Visualid1(#OPSNR.AsString) Visualid2(#VARNR) Nkey1(#LISTCOUNT) Nkey2(#OPSNR) Nkey3(#EANTAL) Nkey4(#OANTAL) Akey1(#LEVNR) Akey2(#LKORT) Akey3(#ART) Acolumn1(#LEVNR) Acolumn2(#LKORT) Acolumn3(#ART) Acolumn4(#FPLDK) Acolumn5(#FPLNO) Ncolumn1(#OANTAL) Ncolumn2(#TOTDK) Ncolumn3(#TOTNO) Ncolumn4(#EANTAL) Ncolumn5(#EANTAL2) Ncolumn6(#AVPCT) Ncolumn7(#UDSAL1)
...
#avListManager.EndListUpdate

I hope that if I understand the listmanager better, I will be able to find the bug, so if anyone has any suggestion please tell me :-)

I would, of course, also like to see some documentation for #vf_sw100 / frameworkmanagers methods, like
#avFrameworkManager.avRestoreValue and .avSaveValue
I don't know what I am doing, nor how I did it. If it works, luck was involved :geek:

MarkDale
Posts: 103
Joined: Wed Dec 02, 2015 10:06 am

Re: VLF question re. GetCurrentInstance and #vf_lw002

Post by MarkDale » Wed Aug 31, 2016 6:28 am

Just checking.
This is in a WAM filter is it?
What version of the VLF are you using?

There is a hotfix 5 for VLF132100 which is described as
153642 The first attempt to retrieve an NKEY (numeric key) of the current instance list entry may return 0 instead of the correct value.

So that might be your problem. Contact support to get the hotfix.

User avatar
HMJust
Posts: 51
Joined: Wed May 11, 2016 7:23 pm
Contact:

Re: VLF question re. GetCurrentInstance and #vf_lw002

Post by HMJust » Wed Aug 31, 2016 4:31 pm

Yes.

VLF build #140006, so I would expect it to be included already.

And incredibly, after looking through the various docs for VL for a month, I found some that may be useful here: http://docs.lansa.com/14/EN/lansa048/in ... istmanager. I'll begin to go through that now.
I don't know what I am doing, nor how I did it. If it works, luck was involved :geek:

MarkDale
Posts: 103
Joined: Wed Dec 02, 2015 10:06 am

Re: VLF question re. GetCurrentInstance and #vf_lw002

Post by MarkDale » Wed Aug 31, 2016 4:47 pm

There's a hotfix 1 for 140006 that's in the same area and might well solve your problem. You can get that from support.

User avatar
HMJust
Posts: 51
Joined: Wed May 11, 2016 7:23 pm
Contact:

Re: VLF question re. GetCurrentInstance and #vf_lw002

Post by HMJust » Wed Aug 31, 2016 11:19 pm

Thank you.
I don't know what I am doing, nor how I did it. If it works, luck was involved :geek:

Post Reply