Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Function Index > L

LJS

Scroll Prev Top Next More

(LJS(text,width))

 

Left justifies text in width characters, returning a text string.

 

In the following example, the value of vljs is ABCD. The text string is left justified in the field. In this case, trailing blanks are removed.

 

SET VAR vljs = (LJS('ABCD',10))

 

The value of vljs2 in the following example is COLUMN ONE          COLUMN TWO. You can use LJS to embed spaces and concatenate strings, for example, to create a row of column headings for a screen or variable form. When you concatenate strings before assigning the result to a variable, as in this example, trailing blanks are retained. These spaces are preserved even if the first value is null.

 

SET VAR vljs2 = (LJS('COLUMN ONE',20) + 'COLUMN TWO')

 

The following example returns COLUMN TWO if vcolname is null.

 

SET VAR vcol2 TEXT = 'COLUMN TWO'

SET VAR vljs3 TEXT = (LJS(.vcolname,20) + .vcol2))