Search found 35 matches

by BrendanB
Mon Dec 02, 2019 9:42 am
Forum: Questions & Answers
Topic: Method options *CONSTRUCTOR and *REQUIRED
Replies: 3
Views: 188

Re: Method options *CONSTRUCTOR and *REQUIRED

Marcus, The thing to remember: *New #TestComponent is not the same as *New #TestComponent.umConstructor The first is the *DEFAULT* constructor, the second is the constructor that you defined. The required flag tells VL that it cannot use the default constructor for the object. I think the bug is tha...
by BrendanB
Fri Nov 29, 2019 9:51 am
Forum: Questions & Answers
Topic: Method options *CONSTRUCTOR and *REQUIRED
Replies: 3
Views: 188

Re: Method options *CONSTRUCTOR and *REQUIRED

Marcus, try creating a RP Function Options(*DIRECT) Begin_Com Role(*EXTENDS #PRIM_OBJT) Define_Com Class(#prim_alph) Name(#searchValue) Define_Com Class(#prim_alph) Name(#replacementValue) Define_Pty Name(SearchValue) Get(*Auto #searchValue) Set(*Auto #searchValue) Define_Pty Name(ReplacementValue) ...
by BrendanB
Tue Nov 26, 2019 9:58 am
Forum: Questions & Answers
Topic: VL-WEB #PRIM_LIST Selected?
Replies: 2
Views: 163

Re: VL-WEB #PRIM_LIST Selected?

Art,

did you try:

Code: Select all


Evtroutine Handling(#List.ItemSelected) Item(#Item)

* Call Mthroutine to Load Popup

Endroutine

B.
by BrendanB
Wed Nov 20, 2019 10:47 am
Forum: Questions & Answers
Topic: #PRIM_MD.Dropdown set selected VL-WEB
Replies: 6
Views: 208

Re: #PRIM_MD.Dropdown set selected VL-WEB

Ahh... gotcha... #DropDown.Items.Add( #shAcco001.AsString #shName ) is the same as #DropDown.Items.Add Value(#shAcco001.AsString) Caption(#shName) (There is actually a 3rd Parameter 'Result' -- boolean ^H^H^H^H^H^H^H object to let you know that the add succeeded or failed.) so to set the value you d...
by BrendanB
Tue Nov 19, 2019 4:29 pm
Forum: Questions & Answers
Topic: #PRIM_MD.Dropdown set selected VL-WEB
Replies: 6
Views: 208

Re: #PRIM_MD.Dropdown set selected VL-WEB

Art,

could you please share your code for creating the dropdown?

I wasnt aware that #prim_md.Dropdown allowed 2 columns....

B.
by BrendanB
Tue Nov 19, 2019 1:57 pm
Forum: Questions & Answers
Topic: #PRIM_MD.Dropdown set selected VL-WEB
Replies: 6
Views: 208

Re: #PRIM_MD.Dropdown set selected VL-WEB

Art, you have to do something like this: * CODE TO LOAD DROPDOWN: #dropDown1.AddItem Value(#shpVal) Caption(#shpCaption) #dropDown1.AddItem Value(#shpVal2) Caption(#shpCaption2) * Below code sets the 'selected' item as #shpVal (first item i added). #dropDown1.Value := #shpVal so your code could be r...
by BrendanB
Thu Oct 03, 2019 11:22 pm
Forum: Suggestions for Product Enhancements
Topic: Free Form Text Block in Code Editor
Replies: 3
Views: 328

Re: Free Form Text Block in Code Editor

Joe, something that one of my colleagues does when doing SQL statements: #lSql := "( SELECT BDBC, BDFTYP, BDFR, " #lSql += " case when Month = 1 then sum(GM) end as JAN," #lSql += " case ..." and so on.... This allows you to break the statement for readability.... I know it is not as nice as what yo...
by BrendanB
Wed Oct 02, 2019 10:16 am
Forum: Questions & Answers
Topic: How do you decode a base64 string and turn it into a file (as pdf) and save it to a network drive
Replies: 5
Views: 386

Re: How do you decode a base64 string and turn it into a file (as pdf) and save it to a network drive

you could also use the Integrator SMB Service to move the file from the IFS to a Network Server (SMB service handles domain users, so that might be easier than setting up FTP/QNTC).
by BrendanB
Fri Sep 27, 2019 3:46 pm
Forum: Questions & Answers
Topic: Collection in collections
Replies: 3
Views: 255

Re: Collection in collections

soa,

you need to:

Define_Pty Name(ItemMarks) get(*REFERENCE #ItemMarkCol)

then you can do:

#StdMarkCol.ItemMarks.Insert((*New #SMMKC2))
#StdMarkCol.ItemMarks.Last := #STDMKC_1 (could also do: #StdMarkCol.ItemMarks<#StdMarkCol.ItemMarks.ItemCount> := #STDMKC_1

and this should work.
by BrendanB
Wed Sep 25, 2019 9:31 am
Forum: Questions & Answers
Topic: VLWEB Photo
Replies: 4
Views: 252

Re: VLWEB Photo

I have found the Filepicker to allow taking photos on a mobile device.

I am not so sure that it will do that on a PC - you would need to test.

BTW - EPC142060 introduced a #PRIM_MD.Filepicker so that you can style the filepicker in the same way you style #PRIM_MD.Buttons.
by BrendanB
Tue Sep 03, 2019 12:52 pm
Forum: Suggestions for Product Enhancements
Topic: BLOB and IE 11
Replies: 1
Views: 353

Re: BLOB and IE 11

Paul, you can use https://docs.lansa.com/14/en/lansa016/prim_web.blobreader.htm to read the blob. so call a method something like below should do the trick. Mthroutine Name(ReadBlob) Define_Map For(*INPUT) Class(#STD_BLOB) Name(#iBlob) Define_Com Class(#PRIM_WEB.BlobReader) Name(#BlobReader) #BlobRe...
by BrendanB
Wed Jun 12, 2019 8:55 am
Forum: Questions & Answers
Topic: SQL Join
Replies: 9
Views: 685

Re: SQL Join

Hi, you are on the right path... simply do: define_com class(#prim_alph) name(#SqlStatement) #SqlStatement := "SELECT IM.*, SR.SRNDSC FROM im join sr on IM.IMFGRP = SR.SRNref WHERE sr.srnid = 'FG' and SR.SRNDSC like '%' || trim('" + #CASES + "') || '%' ORDER BY im.imitno" but change IM.* to the actu...
by BrendanB
Thu Apr 04, 2019 10:17 am
Forum: Questions & Answers
Topic: Make image sizes smaller (Composer)
Replies: 1
Views: 4423

Re: Make image sizes smaller (Composer)

René, depending on which type of server (windows or IBMi) they are using, the 'easiest' solution would be to place the files in a directory (from the xml) and use WATCH_DIRECTORY activity to monitor for new files, then run an external program over them (there are various command line programs for bo...
by BrendanB
Thu Mar 21, 2019 3:35 pm
Forum: Questions & Answers
Topic: Disable Autofill function in Browser
Replies: 6
Views: 3564

Re: Disable Autofill function in Browser

Hi Dominique, attached is a Widget that I created called 'DisableAutoCompleteWidget'. (System is VisualLANSA 14.2 EPC142040, so you will need a matching system to import to). QuickExport20190321153023.zip Simply drag this onto your View or Dialog ETC. (the CreateInstance of the Widget will set autoc...
by BrendanB
Tue Dec 18, 2018 8:49 am
Forum: Questions & Answers
Topic: Dynamically set the visiblility of #PRIM_MD.ListIcon
Replies: 3
Views: 3359

Re: Dynamically set the visiblility of #PRIM_MD.ListIcon

Try: For Each(#Item) In(#List.Items) #PhoneIcon.CurrentItem.Visible := (#Sys_Web.Device = Mobile) EndFor This works because: a. the #Name.CurrentItem points at the named item in the list for the Current Item (in this case also represented by #Item). b. Using an expression to set the value. HTH, Bren...
by BrendanB
Tue Jul 31, 2018 4:38 pm
Forum: Questions & Answers
Topic: Should we use Material Design Style controls when developing VL Web application after V14 SP2?
Replies: 6
Views: 2061

Re: Should we use Material Design Style controls when developing VL Web application after V14 SP2?

After Upgrading to V14 sp2, it appears that all visualizations are now using the #prim_md style. It takes a bit of fiddling if you want these to show as before. (although, perhaps curiously, any visualizations that were dragged into a panel before applying the service pack stay in the old style). if...
by BrendanB
Tue Jul 31, 2018 9:55 am
Forum: Tips and Techniques
Topic: How to Store Passwords Securely in the Database
Replies: 2
Views: 9978

Re: How to Store Passwords Securely in the Database

with the new REST api features, you may be able to create a secure API that can be used by .Net/RPG/java etc that will do the password checking for you. and an API to handle 'change password' functions. This would bring you back to a single 'point-of-failure' -- your LANSA server module. Much easier...
by BrendanB
Tue Jul 10, 2018 8:32 am
Forum: Questions & Answers
Topic: List Positioning
Replies: 3
Views: 1252

Re: List Positioning

soa,

I use the following method:

Mthroutine Name(ScrollToTop)

#Tree.VerticalScrollTo( #Tree.Items<1>.Design Top)

Endroutine

The trick is that the 'control' is actually the design of the item.

Brendan.
by BrendanB
Tue Apr 17, 2018 9:50 am
Forum: Questions & Answers
Topic: Best way to show/animate loading on VL-WEB
Replies: 7
Views: 1982

Re: Best way to show/animate loading on VL-WEB

If you place your gif files in webserver/Images directory then you can do: #LoadingImage.Filename := 'http://anotherwebserver/Images/mygif.gif' or: #LoadingImage.Filename := '/Images/mygif.gif' to set the image to a mygif.gif. In the first case, you can see that you could store the gif files on anot...
by BrendanB
Tue Apr 03, 2018 1:17 pm
Forum: Questions & Answers
Topic: VL-Web placeholders and Google/Mozilla auto fill
Replies: 5
Views: 1612

Re: VL-Web placeholders and Google/Mozilla auto fill

I have had some success with naming vars correctly. Example: for your input boxes, ensure that the name is 'username' and 'password'. Chrome will see the 'name' attribute and will offer to save username/password for the site (or autofill if you have saved before). I suspect as long as the name match...