Displays a message box or message in the foot line.
messagebox=<typ>$$<text>
Error message in Tool bar |
BeasScript: messagebox=error$$Hello World
|
Info message in Tool bar |
BeasScript: messagebox=info$$Hello World |
Ok message in Tool bar |
BeasScript: messagebox=ok$$Hello World
|
OK message |
BeasScript: messagebox=ok$ok
|
Simple popup message |
BeasScript: messagebox=hello world
|
Messagebox with Placeholder |
Beas Script: string ls_name ls_name=James Bond messagebox=Hello <ls_name> Today is <today,dddd dd mmmm yyyy>, <now,hh:mm am/pm>
|
Question |
Simple Variant: use command question BeasScript: question=Is this correct?=yesfunction()=nofunction() function yesfunction messagebox=Thank you end function function nofunction messagebox=Sorry. Next time i'll be better end function
|
In follow variant you can create a complex messagebox
Beas Script
messagebox=<typ>$popup=true<tab><parameter><tab><parameter><tab> ....
messagebox({"popup"=true,"parameter"="...","parameter"="..."})
You have many properties. Use the Script assistant to generate the source code
Follow properties are available
|
if keyword "<html>" or "<body> inside the message text, beas display the text in an internet explorer window if you don't define <body>, beas use HTML Standard format
messagebox=info$popup=true<tab>text=<body>Hello world</body>
You can use every html style and can create html tables
// Define First line of HTML ad variable htmltext // with #define we don't need the & sign for define next row. // it's simple to define in this way #define htmltext <i>Hello</i>, this is a <b>good</b> example<br /> <small>I like this type of messages</small> <table border=2> <tr><td>ItemCode</td><td>Description</td></tr> #end
// Create a datastore and read first 10 items // add this with table attributes to the variable htmltext declare=d=ue_datastorevalues d.select top 10 "ItemCode","ItemName" from "OITM" order by "ItemCode" for ll_loop=1 to <d.rowcount> d.setrow=<ll_loop> addvar=htmltext=<tr><td><d.itemcode></td><td><d.itemname></td></tr> next destroy=d // add end of table addvar=htmltext=</table> // and display this. Use keyword <body> messagebox=info$popup=true<tab>text=<html><body><htmltext></body></html>
Working with pictures
In Background we don't have a WEB Server. All is files based We need always full path form local system or complete network path
Attribute to display pictures <img src="pic_trulli.jpg">
setvar=htmltext=& Example with picture<br/>& <img src="<system.homefolder>bmp\gfx\big_time.png">
messagebox=info$popup=true<tab>text=<body><htmltext></body>
|
With the message id you can define every message as unique id In translation system you can define the translation per language and id
Standard messages: in file [homefolder]\program\language_e.src you can find the complete translation table in area "M:[id]" you can see the message id's and on right side the Text
Example: M:feinb1 = Item <art_id> does not exist! string art_id art_id=Sofa001 messagebox=info$feinb1$
But for better reading of source code messagebox=info$feinb1$Item <art_id> does not exist
Own translation
For customizing multilanguage you can define own translation table AddOn Administration (beas) -> Edit -> Language -> Edit Message -> Define Language, Meessage No and Message text
Now you can use it
string ls_itemcode ls_itemcode=Sofa001 messagebox=info$id=beas0001<tab>popup<tab>text=Verwende nicht den Artikel <ls_itemcode>
or as simple variant - in bottom line
messagebox=info$beas0001$Verwende nicht den Artikel <ls_itemcode>
|
with (properties) after message type you can define additional log entries
message=error(propertie,propertie2)$messageid$message
Example messagebox=error(shortprotocol)$$This is my next with copy in shortprotocol
|
Examples gapp.of_meldung(„BEASMELDUNG",[messagenumber^Text],[datawindow],[{Placeholder,Value}]) gapp.of_meldung(„BEASMELDUNG",[messagenumber^Text],[{Placeholder=Value}])
Place holders shall be transferred as following: {„Placeholdertext=Value","Placeholdertext=Value"} e.g. gapp.of_meldung(„BEASMELDUNG","messagenumber^Works from <fromdate> to<todate>",{"fromdate="+string(idw.vd[1]),"todate="+string(idw.bd[1])})
With TAB gapp.of_meldung(„info","popup=true~ttext=hello world") gapp.of_meldung("info","id=12345"+char(9)+"text=hello world") gapp.of_meldung("error","id=12345<tab>text=hello world<tab>popup=true") gapp.of_meldung("info","text=<body>this is my html-text</body>")
|