Search found 24 matches

by BrendanB
Wed Jun 12, 2019 8:55 am
Forum: Questions & Answers
Topic: SQL Join
Replies: 9
Views: 248

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

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

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

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

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

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

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

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

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

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: 1
Views: 811

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

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

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

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

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...
by BrendanB
Tue Apr 11, 2017 9:47 am
Forum: Questions & Answers
Topic: Login PopUp - how to allow remembering login values ?
Replies: 5
Views: 1677

Re: Login PopUp - how to allow remembering login values ?

Typically, most browsers look for input fields with the labels: <input type='text' name='username'> <input type='password' name='password'> I have had some success by naming the fields on my login form 'username' and 'password'. I think you will have to ensure that you have (at least) 2 input boxes,...
by BrendanB
Wed Apr 05, 2017 1:45 pm
Forum: Questions & Answers
Topic: My first Widget
Replies: 2
Views: 1199

Re: My first Widget

QuickExport20170405134140.zip
(16.29 KiB) Downloaded 148 times
Jim,

attached is modified version of your widget/webpage.

obviously, i am loading the file locally (the mp3 file). so you will need to change the webpage for that...

Brendan.
by BrendanB
Fri Mar 24, 2017 1:16 pm
Forum: Questions & Answers
Topic: AsDisplaystring
Replies: 4
Views: 1356

Re: AsDisplaystring

Jim, Try here: http://docs.lansa.com/14/EN/LANSA016/PRIM_LIBI.IFIXEDPOINTINTRINSICS_AsDisplayString.htm Packed strings use the same intrinsic logic as for FixedPointIntrinsics.asDisplayString. Essentially, this will allow you to format the number using the various options (see the link for details)....
by BrendanB
Tue Jan 10, 2017 4:58 pm
Forum: Questions & Answers
Topic: Vanity URLs on the IBM i
Replies: 4
Views: 1728

Re: Vanity URLs on the IBM i

To do this, you will need to create a webserver running on (eg. port 80), using the ibm web console. Assuming you did that, modify the httpd.conf for this webserver to have: this at the top # Load PROXY handling modules # LoadModule proxy_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM LoadModule prox...
by BrendanB
Wed Jan 04, 2017 9:39 am
Forum: Tips and Techniques
Topic: Donut Guage
Replies: 1
Views: 1929

Re: Donut Guage

Just a quick note to anyone that downloads this.

The CSS file is an external resource (included in the QuickExport). You may need to open the external resource and click the extract button to load the css file.

This is necessary to handle all the different browsers.