Generate a sqltable-Result
You can work with the assistent or directly with script
Example: Reservationlist
shtml=sqltable=init
shtml=sqltable=border=0
shtml=sqltable=def=1=(Lot Nr),2=(Quantity)
shtml=sqltable=sql=select batchnum,quantity from oibt where itemcode='<col_itemcode>' and whscode='<col_whs>' and quantity>0
Definition
object=<objectname> |
The initialisation-String is in a SQL-Container (sub-Function type SQL) You initialize the sql with this command 1. Create a function, type SQL with initial the SQL 2. Start Init and Execute shtml=sqltable=object=<yourfunction> shtml=sqltable=execute |
type=0/1/2 |
Type of Table 0 = List 1 = edit 2 = only view |
width |
width of table, example 100% |
border |
border of table, example 0 or 1 |
rows=xxx |
max. rows per page |
search |
insert a search-field. The filter is in Variable tablefilter shtml=sqltable=search shtml=sqltable=sql=select itemcode,itemname from oitm where itemcode like N'%<tablefilter>%' |
addfunction |
Add a function for the table shtml=sqltable=addfunction=name=function Example: Delete-Button in edit-Formular shtml=sqltable=addfunction=del=del Functions shtml=sqltable=addfunction=del=del=primarykey Ruft die gleiche Seite auf mit dem primary=[primarykey] requesttype=del
|
table |
table to select |
fields |
fields for table to select |
where |
where -statement for table-select |
sqlstring |
the full sqlstring
if you need ' - Signs in a string-Area, you can work with ` this is replace with '+char(39)+' if you need sql-fields in a string, you can work with (: and :), example '<id="field_(:oitm.itemcode:)>' ->
Example: select '<input type="text" name="translate:(:oitm.itemcode:)" value="" size="40" onchange="mayajax(`language_translate`,this.value)" >' from oitm
with Result im SQL-String select '<input type="text" name="translate:'+oitm.itemcode+'" value="" size="40"
with Result in html-String: <input type="text" name="translate_A005" value="" size="40"
|
clickurl |
urlstring to send while clicking or next/preview page you set the variable which are to send, separate with comma Example: shtml=clickurl=col_ send all current variables, beginning with "col_" example setvar=col_itemcode=A1500 shtml=clickurl=col_
create a extended String col_itemcode=A1500& and add this to the click-url |
commands
sql |
execute SQL-Command and display the table or formular shtml=sqltable=sql=select itemcode,itemname from oitm |
update |
Update a Formular you must set table, fields and where |
execute |
display a list or formular |
Format Header
titleline=html-script |
HTML-Sequenz between <table><tr> and the </tr><dataarea> You can set the Header with one line as html-Sequence |
titleattribut=html-script |
HTML-Sequenz between <table and > Example shtml=sqltable=titleattribut=width="100%" border=1
|
Format Header-Column
title=#col=titletext |
set the title (only text) set the titletext or translate-id if beas can't translate this text, beas will display the translate-id |
titlehtml=#col=html-sequence |
write this script as Title-Column. You can work with beas-placeholder. The current Column-Name is in placeholder @title@ |
page=#col=<page> |
set link (see command def=page) |
pageparameter=#col=<page> |
set parameter for a link (see command def) |
def=col=(attrib),col=(attrib) |
set the properties per column Example title: shtml=sqltable=def=1=(title=Itemcode),2=(title=itemname),3=(title=quantity,align=right),4=(visible=false ) Short Variant: def=1=(itemcode),2=(itemname),3=(title=quantity, align=right),4=()
if you want only set the title, you can write this with colnr=(title) if you want to set unvisible, then set colnr=() (without parameter) |
command def
title=<title> t=<title> |
set the title |
titlehtml |
set the title with HTML-Attribute, replace placeholder @title@ with the title-attribut. example shtml=sqltable=def=1=(Itemcode) shtml=sqltable=def=1=(titlehtml=<b>@title@</b>)
|
alignment=left/center/right align=left/center/right |
set the alignment for title and column left, right, center default-alignmet is vor char and date: left, numbers: right |
translate |
translate the Column |
inputtype |
if sqltable is edit or view, then you can set the inputtype Example: text, textarea, checkbox Standard: if format=checkbox, then checkbox else text |
size |
input-size (only text) |
cols |
input-cols (only textarea) |
maxlength |
input-max-length (only text) |
rows |
input-rows (only textarea) |
disable=true/false |
disable the field |
readonly=true/false |
set field to readonly |
values |
set the values |
format |
set the format Numbers: #,##0.00 Checkbox: checkbox, checkbox-10, checkboy-yn, checkbox-jn Date: yyyy/mm/dd Number-Format linked with Unit: c:unitcolumnname String: blank=Delete all HTML-Attributes blank 100 = Delete all html and display only first 100 Letters |
visible |
set the visible or unvisible-flag 0, N or false=unvisible 1, Y, J or true=visible you can work with placeholder! |
page |
if you set this parameter, beas insert a bitmap. If you click on this, beas jump to this page and set the Variable col_[fieldname] with the current column, if you don't set other parameter with pageparameter page=itemedit Example shtml=sqltable=def=1=(Itemcode)
if you click on this field, beas open the window "itemedit" and set the Variable 'col_itemcode'
if page "javascript:function()" then beas execute this javascript and insert the actual column as parameter
Example shtml=sqltable=1=page=javascript:checkentry()
execute the funktion checkentry('itemcode')
if you set the pageparameter, beas will send the parameter to this function |
pageparameter |
set parameter for the page-Link shtml=sqltable=1=pageparameter=@sqltable.1@&@sqltable.2@ or javascript: shtml=sqltable=1=pageparameter='@sqltable.itemcode@'
you can set the column-id or column-name. Better is column-id |
name |
set the name of this field if this a formular, beas will set the name "col_"+columnname if you set the name, beas will set this name. |
CSS-Information
The Table have follow ID's for Class-Definition
<table> id=[tablename] ..</table> |
Id from Table |
<tr id=[tablename]_row0 > |
Id for Row 1,3,5,7... |
<tr id=[tablename]_row1 > |
Id for row 2,4,6,... Example:
|
<td id=[tablename] > |
Id for Left and Middle-Cols |
<td id=[tablename]_right> |
Id for the Right-Column |
Example Standard-Table with small blue Border
table#sqllist {font-size: 11px;border-bottom:1px solid #9999FF ; }
td#sqllist {border-left:1px solid #FF ; border-top:1px solid #9999FF ; padding: 3px;}
td#sqllist_right {border-left:1px solid #FF; border-right:1px solid #9999FF; border-top:1px solid #9999FF; padding: 3px;}
th#sqllist {border-left:1px solid #FF ; border-top:1px solid #9999FF ; padding: 3px;}
th#sqllist_right {border-left:1px solid #FF ; border-right:1px solid #9999FF ; border-top:1px solid #9999FF ; padding: 3px;}