Search found 29 matches

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: 209

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: 289

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: 198

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: 201

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: 295

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: 587

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: 4373

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: 3468

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: 3305

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: 1988

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: 9911

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: 1205

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: 1905

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: 1558

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...
by BrendanB
Fri Mar 23, 2018 10:24 am
Forum: Questions & Answers
Topic: SELECT_SQL - Connect to server
Replies: 5
Views: 1643

Re: SELECT_SQL - Connect to server

Nic, one way around this is to use a partition for each developer (on the iSeries). This should allow each developer to 'deliverTo' their own partition for testing. Of course, this may slightly complicate your use of Git, but this is one way around your problem. the other way that i can see, is to u...
by BrendanB
Thu Nov 16, 2017 9:34 am
Forum: Questions & Answers
Topic: Can I call a Stored Procedure on IBMi via SELECT_SQL and share a result set ?
Replies: 2
Views: 1003

Re: Can I call a Stored Procedure on IBMi via SELECT_SQL and share a result set ?

Patrick, just a suggestion, try changing: #SQLQRY := 'CALL GETTITL' to #SQLQRY := 'CALL ODCDEMOLIB.GETTITL' also, test that this works using STRSQL from the command line. in general, SQL wont use the library list, so you need to be explicit. When I have used Stored Procedures on the IBMi, I always t...
by BrendanB
Mon Oct 30, 2017 2:11 pm
Forum: Questions & Answers
Topic: Integrator SMTPMailService Rich Emails
Replies: 2
Views: 1088

Re: Integrator SMTPMailService Rich Emails

Joe, you can use a file as a template by doing: Define Field(#EmailText) Type(*CHAR) Length(1000) Input_Atr(LC) Def_List Name(#EmailBody) Fields(#EmailText) Type(*WORKING) Entrys(*MAX) Use Builtin(TRANSFORM_FILE) With_Args(#EmailBody #TemplateName T) To_Get(#FILE_RETC) #TemplateName is the name of t...
by BrendanB
Thu Aug 10, 2017 8:59 am
Forum: Questions & Answers
Topic: Calling Server Routine from HTML/Javascript
Replies: 9
Views: 2891

Re: Calling Server Routine from HTML/Javascript

Search the docs.lansa.com for JSON Convenience Wrapper

Whilst this is specifically for talking to WAM (webroutines), the mechanism is basically identical for SRVROUTINEs.
by BrendanB
Mon May 29, 2017 11:15 am
Forum: Questions & Answers
Topic: Using VCS with IBMi
Replies: 1
Views: 872

Using VCS with IBMi

This may also be a way around Joes issue (forum topic: SQL Server Express Limits) . Scenario: Server Modules need to access RPG programs on the IBMi in order to get certain pieces of data (ie. not all data is accessible through data files). Problem: Testing on a PC wont allow for this without 'Deliv...
by BrendanB
Wed May 03, 2017 3:37 pm
Forum: Questions & Answers
Topic: Trying to get SMTPMAILSERVICE working
Replies: 2
Views: 1286

Re: Trying to get SMTPMAILSERVICE working

Not sure if this is a typo, but: If Cond('#JSMSTS *NE OK') #JSMCMDX := 'SERVICE_LOAD SERVICE(SMTPMAILSERVICE)' Use Builtin(JSMX_COMMAND) With_Args(#JSMHDLX #JSMCMDX) To_Get(#JSMSTS #JSMMSG) Execute Subroutine(Check_Sts) With_Parms(#JSMSTS #JSMMSG) #stage := 'service' Endif should be: If Cond('#JSMST...