create

 

Allow to create columns, text objects or other visual components

dw_1.create("column",{properties})

 

 

A field has 2 parts:
1. Text field, 2. Input field

The input field need a reference to the database layer of the Report

 

create-field1

 

In Script Editor you can see available fields from database layer

create-field2

 

for create new fields you can use UDF5 ... UDF15
and userfield1...x

 

UDF1..4: This fields available. You can make this fields visible in Configuration Wizzard
In most of windows UDF 5..15 available. This field are linked with Database and you can use this fields for customizing

In many windows userfield1...x available. This fields are not linked with Database.
All UDF and userfields have always type String and length of 50 characters.
Userfields allow to insert up to 16 KByte, but only, if the name of this field (property "name") start with "userfield" or "template"
Example: name=userfield_test<tab> ...
If you use another name and if you insert more then 50 chars, you will become the error message "(itemchanged13249) incorrect entry! Please correct!"

 

Best place to define new fields outside tab area is form_loaded

 

Syntax to create new field

 
global function form_loaded

#jbs
dw_1.create("column",{name:"udf5",id:"udf5",x:800,y:292,width:200});
end global

name = field name

id=udf5 = link to database layer

 
Both can be the same. But link a field from database layer only ONE time to a visible column.
 

Create a field on this defined position. You can fill it, beas load and save the value
create-field3

 

Description of the field
The description is always on left side. The Description field (text object) has same name as the input field +"_t", example "udf5_t"

You can create this in one line together with the colum

 

global function form_loaded
dw_1.create("column",{name="udf5",id="udf5",x=1000,y=292,length=220,text="BoyumTxt",x2=750,width2=220})
end global

 

create-field4

 

Field inside TAB Area

 

In many windows we've tab area inside the Datawindow

Tab Area are not the Tab on top. The Tab area is always inside the Datawindow

 

Example Operatino Catalog - General / Extented / Tool

Fields inside a Tab area are in same Datawindow, but in different cases Datawindow 2, 3 and so on

 

 

create-fieldtab

 

Name of the Tab object is "etab". In some windows we've tab objects inside main tab area with another name.

Every tab-element have own name, example the first tab has name etab.stamm

 

You can see the object name and tab name in debug window if mouse over the tab name

create-fieldtabdebug

 

This Tab objects created in form_load, form_loaded or other events.
Correct place to define a field in a tab is

 

global function etab_firstredraw
#jbs
end global

 

Use property "related" to define the position to another field
Example we want to insert a field "BoyumTxt" down of "Number of payslips"

 

global function etab_firstredraw
#jbs
dw_1.create("column",{name="udf5",id="udf5",text="BoyumTxt",related="anzls"});
end global
 

create-fieldtab2

 

Attention:

In this window we've empty areas, which not always empty
Example: Area "Processing" / "Personnel" ... beas display additional fields related of other settings, here related to cost counts.

 

Alternative: Define position manually

With tabobject, tabpage you can define the tab area
Position x=0/y=0 is left top of the Tab, not of the window

dw_1.create("column",name:"udf5",id:"udf5",text:"BoyumTxt",tabobject:"etab",tabpage:"stamm",x:...y:...,x2:...,wdith2:...})

 

Numeric fields, Date Fields

Userfields are always string fields and not numeric or date fields

But it's possible to simulate numeric or date fields

Concept: Define the type of field

 

Example:

 

Operation catalog - new field Number field with 2 decimal places

we need

alignment=1 = right alignment

type=#0.00   = numeric, 2 decimal places

 

global function etab_firstredraw 
#jbs
// add new field, right alignment
dw_1.create("column",{name:"udf5",id:"udf5",text:"BoyumNum",related:"anzls",alignment:1,type:"#0.00"});
end global

 

as date field

we need

dropdown="date" = Calendar

type="date"     = replace input in correct date format

 

global function etab_firstredraw 
#jbs
// add new field, right alignment
dw_1.create("column",name="udf5",id="udf5",text="BoyumDate",related="anzls",dropdown="date",type="date"});
end global

 

Create new visual objects (Button, Textfield, Column) in current form

 

 

 

Item Types

Type

Description

create("text",{...});

Create a Text Object

create("column",{...};

Create a Input Field

create("bitmap",{...};

Create a Bitmap (only beas)

create("compute",{...};

Create a Computed Field (only beas)

create("checkbox",{...};

Create a Checkbox-Field

 

Properties:

Property

Object

Description

alignment

column, compute

The alignment of the control's text within its borders. 0 - (Default) Left, 1 - Right, 2 - Center, 3 - Justified

position

button

band

all

bitmap

bitmap, button

checkboxoff

column

Only Checkbox: set the "OFF"-Value. Standard =N (if checkboxon = Y or J) or 0 (if checkboxon=1)

checkboxon

column

 

dropdown

column

expression

compute

fontsize

button

define font size (30 .... 60)

Note: Not possible for buttons in the bottom

forecolor

button

format

column, compute

Output Format. (onlya for type Column and Compute), Default: "[general]"

height

all

id

column

Only for columns. Name of the column that should be used ( e.g. userfield1, udf5 ..15)

Each Field can only be used once.

name

all

MANDATORY! Unique name of the Object.

related

all

tab

column

Only for columns: define the order of tab

tabobject

all

object is part of tab area ... (normal "etab") beas 9.3 PL 2

tabpage

all

object is part of tab page (1...x or name of tab page) beas 9.3 PL 2

text

column, text, button

textstyle

button

define text style 0=normal, 1=weight, 2=italic, 3=weigt+italic

tooltip

column, button, text

define tooltip

type

column

underline

text, column

underline text (true/false or 1/0)

values

column

visible

all

Visibly yes/no (1/0)

width

all

width2

column

x2

column

x,y

all