Search found 134 matches

by BrendanB
Fri Oct 18, 2024 1:18 pm
Forum: Questions & Answers
Topic: asLocalizedDateTime calculation differences
Replies: 5
Views: 30286

Re: asLocalizedDateTime calculation differences

Anthony,

The problem really is:

if stored in UTC on a server as 17/10/2024 22:14:49 UTC 0

when converting to display do you want to see it UTC +11 or UTC +10?

if you ALWAYS want to show the time as UTC +11, then you should convert to a display string ON THE SERVER. (since it is in UTC+11)...

if ...
by BrendanB
Mon Sep 30, 2024 8:50 am
Forum: Questions & Answers
Topic: How to automate LANSA web cleanup on a Windows app server ?
Replies: 1
Views: 8803

Re: How to automate LANSA web cleanup on a Windows app server ?

Patrick,

in your ..\x_win95\x_lansa\execute directory you will find:

w3_p2200.exe

i believe this is the 'windows' version of W3@P2200 (and it looks like you can probably pass it parameter *WAMONLY if you only want to remove web session data).

so this is most likely the way to execute a cleanup ...
by BrendanB
Mon Sep 16, 2024 12:26 pm
Forum: Questions & Answers
Topic: Message Descriptions in LANSA/Windows
Replies: 3
Views: 14561

Re: Message Descriptions in LANSA/Windows

Anthony,

sometimes i can do things the hard way....

In your IDE you should be able to go to the 'Tools' Ribbon and there should be an icon for 'Message Files'.

Click this, and you can select your message file, search it based on description or message ID, change, add, delete etc....

so there you ...
by BrendanB
Thu Sep 12, 2024 9:33 am
Forum: Questions & Answers
Topic: Using PRIM_KBRD
Replies: 3
Views: 13475

Re: Using PRIM_KBRD

Romain,

I used the following view for my testing: (compile the view, and show it on a webpage).

what i observed is that:

1. SHIFT, CONTROL, ALT all *only show* when another key is pressed.
2. you cannot press combinations that the Browser already checks for (eg. CONTROL-C, CONTROL-F, CONTROL ...
by BrendanB
Wed Sep 11, 2024 9:22 am
Forum: Questions & Answers
Topic: Using PRIM_KBRD
Replies: 3
Views: 13475

Re: Using PRIM_KBRD

Romain,

There is a Keypress event on the view component.


Evtroutine Handling(#COM_OWNER.KeyPress) Char(#Char) Handled(#Handled) IsAltDown(#IsAltDown) IsControlDown(#IsControlDown) IsShiftDown(#IsShiftDown) KeyCode(#Keycode)
* Here is where you can either process or call a method to process what ...
by BrendanB
Mon Sep 02, 2024 3:31 pm
Forum: Questions & Answers
Topic: Server routine timeout?
Replies: 6
Views: 20719

Re: Server routine timeout?

Romain,

I would recommend that the server routine save the file (i usually copy it to somewhere else) and then delete it in the submitted function (so that you can ensure it is only deleted WHEN you are done with it...)



#xDemoUnicode256 := (*TEMP_DIR + 'test.csv')
#COM_SELF.CopyFile ...
by BrendanB
Fri Aug 30, 2024 10:00 am
Forum: Questions & Answers
Topic: Email BIF - text formatting / font selection
Replies: 2
Views: 16770

Re: Email BIF - text formatting / font selection

Arlyn,

many (but not all) mail clients can handle HTML rendering (which would allow selection of Font, as well as possibly the use of the table tags).

the trick for that is you need to use MAIL_SET_OPTION and ensure that content_type is set to 'text/html'

There are a number of HTML Email Builders ...
by BrendanB
Wed Aug 21, 2024 3:42 pm
Forum: Questions & Answers
Topic: LANSA REST API Persistent Fields
Replies: 4
Views: 18154

Re: LANSA REST API Persistent Fields

If you are going with a GUID, theoretically *GUID_DB should be used (36 chars, with '-' every so often).

to be more secure (especially if using as a claim in JWT tokens), you could also do:


Define_Com Class(#XPRIM_Binary) Name(#CryptoKey)
#CryptoKey.FromRandomBytes ByteCount(32)

#myKey ...
by BrendanB
Tue Aug 20, 2024 8:34 am
Forum: Questions & Answers
Topic: LANSA REST API Persistent Fields
Replies: 4
Views: 18154

Re: LANSA REST API Persistent Fields

I dont think that there is a way to Persist values in a REST API.

If you are using JWT Tokens, then adding a value such as a GUID to the claim, and storing your persistent values in a table keyed by that GUID might be the best way (ensure that you delete from the table when the user 'logs out' or ...
by BrendanB
Thu Aug 15, 2024 9:16 am
Forum: Questions & Answers
Topic: Concurrency check for ibmi physical files
Replies: 6
Views: 20415

Re: Concurrency check for ibmi physical files

on the FETCH and SELECT commands there is a parameter LOCK :

FETCH #fileGroup FROM_FILE(YOURFILE) WITH_KEY(#fileKey) LOCK(*YES)

This will:

1. read the record from the file
2. lock the RECORD in the file

the lock will be released:

1. when the RECORD is UPDATEd
2. when another RECORD is read
3 ...
by BrendanB
Tue Aug 06, 2024 4:32 pm
Forum: Questions & Answers
Topic: Message Descriptions in LANSA/Windows
Replies: 3
Views: 14561

Re: Message Descriptions in LANSA/Windows

Anthony,

i think the table you are looking for is : [LX_DTA].[LX_MSG]

I do not see any BIF for inserting new messages, but presumably you could use SQL directly to insert what you require... (one of the fields is the
'message file' (eg. DC@M01 ) -- i would recommend you try creating your own ...
by BrendanB
Mon Jul 22, 2024 9:42 am
Forum: Questions & Answers
Topic: File upload with special characters
Replies: 3
Views: 16329

Re: File upload with special characters

Paulm,

another way to read things:


Mthroutine Name(ProcessFile)
Define_Map For(*INPUT) Class(#PRIM_DC.UnicodeString) Name(#inFile)

Define_Com Class(#PRIM_IOC.FileStream) Name(#InFileStream)
Define_Com Class(#PRIM_IOC.StreamReader) Name(#StreamReader) Stream(#InFileStream)

Define_Com Class ...
by BrendanB
Mon Jul 22, 2024 9:09 am
Forum: Questions & Answers
Topic: Server routine timeout?
Replies: 6
Views: 20719

Re: Server routine timeout?

Unfortunately you have run into a BROWSER TIMEOUT...

to put it simply, most browsers will 'timeout' a request after 5 minutes of no response. (i think Safari might be 6 minutes, but the rest are 5 minutes).

a better way might simply to be:

have your server routine:

1. receive the file from the ...
by BrendanB
Mon Jul 22, 2024 9:02 am
Forum: Questions & Answers
Topic: External resources for widget
Replies: 1
Views: 9592

Re: External resources for widget

Paulm,

if you have the files in the first location you would access them:

C:\Program Files (x86)\LANSAPTD\Webserver\Images:

In your widget, use the following to access the file:

https://youserver/images/myfile.xml

C:\Program Files (x86)\LANSAPTD\X_WIN95\X_LANSA\x_BPF\web\vl

Use:

https ...
by BrendanB
Tue Jul 02, 2024 9:50 am
Forum: Questions & Answers
Topic: #PRIM_MD.List Row Background Colour
Replies: 5
Views: 23086

Re: #PRIM_MD.List Row Background Colour

Hi,

I just tried the following at EPC150060

This is a view -- you can show it on a webpage to see the effect (you should get 50 items with alternate background colors.

Whilst i can see that you no longer get to drag a panel onto an #PRIM_MD.List, you can also acheive this using a #PRIM_MD ...
by BrendanB
Wed Jun 12, 2024 12:20 pm
Forum: Questions & Answers
Topic: Multicolumn List Cell Interface - #prim_list.IListCellDesign
Replies: 4
Views: 14873

Re: Multicolumn List Cell Interface - #prim_list.IListCellDesign

Anthony,

technically you can only assign 1 reference to each ROW.

of course, that reference could be an object which contains EITHER:

7 individual references (1 for each column)
or
a #prim_lcol<#myObject> (pre-load this 'list-collection' with the desired object references).

it sounds like you ...
by BrendanB
Tue Jun 11, 2024 10:01 am
Forum: Questions & Answers
Topic: Multicolumn List Cell Interface - #prim_list.IListCellDesign
Replies: 4
Views: 14873

Re: Multicolumn List Cell Interface - #prim_list.IListCellDesign

Anthony,

the #Employee that is set as the related reference is an #Employee object (which contains a number of 'properties' -- populated from a server module call).

you can put any object you like as the related reference. you would of course have to create your object. The related reference ...
by BrendanB
Fri May 10, 2024 9:06 am
Forum: Questions & Answers
Topic: Multiple input fields on windows
Replies: 5
Views: 24965

Re: Multiple input fields on windows

Art,

using 3 collections and manually inserting them is one way to do it...

you could also consider using a #PRIM_LIST where each entry contains the necessary objects... eg. if those are buttons or fields, then each entry just has a known width and you can use the known width to calculate how many ...
by BrendanB
Wed Feb 28, 2024 9:37 am
Forum: Questions & Answers
Topic: #XPRIM_JsonWriter & WriteBase64StringFromFile
Replies: 5
Views: 27317

Re: #XPRIM_JsonWriter & WriteBase64StringFromFile

Arlyn,

indeed 65535 chars is the point at which your request will be truncated (on IBMi only).

1 option is to use the StreamWriters to write your request to a file on the IFS, and then use the JSM 'HTTPService' to send the file.
Another option is of course to use JSM to construct the request as ...
by BrendanB
Fri Feb 16, 2024 2:47 pm
Forum: Questions & Answers
Topic: Dynamic Use / Download Themes
Replies: 2
Views: 18686

Re: Dynamic Use / Download Themes

Mark/Rene,

in theory, you could use the following method (pass it the 9-character identifier of your theme) and it would only load when you call this method.

the downside to using this is: At Present time (Feb 2024) there is a bug meaning that this works the first call, but a subsequent call will ...