JsList Control (Remote form Headed List)

David Swain dataguru at polymath-bus-sys.com
Wed Jul 24 12:26:26 EDT 2013


Ambrose,

You're getting the concept of a list DISPLAY FIELD confused with the concept of a list VARIABLE. Common mistake. If you make an instance variable for your form of List data type, any code for populating a list variable will work with that. You then set the value of the "dataname" property of the display field to be the name of the list variable.

You will not be happy with JsList, though. This is NOT a headed list field, but a single column list field like the List field on a window. In the window List display field, we have two techniques for displaying multiple "columns" of values by using the "calculation" property. We can use the jst() function and a monospaced font to define the string value that each line will display - or we can concatenate a string that injects style(kxxTab,pixelposition) functions to separate the apparent column values on each line. JsList doesn't have such a property. It only allows us to specify the column number from the list variable that we want to display.

But with a little work (and cleverness ;-), we can add an extra column, calculate that value for that column to include an HTML table definition with one <TR> and as many <TD>s as we need and then set THAT column as the one to display.

Or you could use the "Data grid Control" field type, which allows multiple display columns to be defined. (Or the "Complex Grid" for that matter.)

HTH!

Regards,

David

On Jul 24, 2013, at 9:42 AM, Ambrose Tobon wrote:

> Hi List,
>  
> I am in the process of changing my app to run on the web using Omnis Studio 6.0. This particular control called jsList (I think refers to the Headed List control in Omnis Studio 6 windows) does not fetch/populate records from the table.Most of the controls codes in the remote form runs without altering any except this jsList.
>  
> Does anyone knows how to populate a list in remote form? or Has notes/literature on remote list?
>  
> This particular code works fine on windows form but not in remote form;
>  Do iv_Terms.$definefromsqlclass('employment_terms')
>  
> Do $cinst.Ostatement.$prepare('SELECT * FROM employment_terms') Returns #F
> Do $cinst.Ostatement.$execute() Returns #F
> Do $cinst.Ostatement.$fetch(iv_Terms,kFetchAll,kFalse) Returns #F 
>  
> Pls educate me.
>  
> Thanks.
> 
> Ambrose
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com




More information about the omnisdev-en mailing list