MS4BIĀ®

MS4BI HELP 2022

by MS4script
01-Introduction
Preface & Copyright
Getting started
Informations + Cmd/param Server
Demos Simple
02- Declarations
Structure
Type
03- Instructions
Conditions if,do,while..
String functions Str..()
Get + Include functions Get, Include..
Date-Time Day, Time, Year.
Display
Call
Formulas Complex
04- Database
Connector Ado, Odbc, Dsn, SAP, Ms4
DB Connect Create, delete
Import DataSource Import, Consolidation
Administration Admin, User
05- Sql-Query
Sql
Query Form : BTS,PLUS
Grid option
06- Charts
Forms Plus, Win, Image, Excel, Morris...
Pie Std, Donut, 3D...
Bar Std, Stack, Line, Area, Plot
Radar
QrCode, Gauge
Step, Stock...
,Google,Leaflet... GeoMap
,Gantt,Timeline,Org.
DrawWindow [web]
07- Dashboard
Form tab, no tab
Responsive UI
08- Report
Report Hierarchy
Report Design
09- Filters
Dialogue + Call
10- Menus
Menu Design
Menu Frameset
Menu Custom
11-UI : Responsive
Tables Responsive,Frame,position
List Group
Text
Panel Header, body, Footer
Button Button, Progress Bar
Icon & Button
Collapse Group, Panel
Notifications
12- Encryption
Encrypt
Decrypt
13- Windows
Dialogue
Picture, Frame, Button..
MsgBox
Grid

Designer

00-OverView
01-Transaction
02-Setting
05-Import
10-Formula
15-Report-Part1
16-Report-Part2
20-Query-Part1
21-Query-Part2
25-Report-Query-Style
30-QrCodeImage
31-Windows
32-Frame
40-TabStrip
50-Collapse
60-BeginForm
63-Input-SubmitBox
70-Input-Select
71-Input-Insert
72-Input-Update
73-Input-Delete
75-Input-Query
77-ListComBo
81-Button-Link
82-Button-DataList
86-Sticky-Label
91-Insert-PhpJsHtml
92-Insert-MS4script
15- Css, html, Php, js.
Insert Native language Begin_sw..End_Sw
16-Install + tools.
Installation & Configuration This Menu
Generate Native... Php, Html, js..
Code Generator Ms4 Script
MarkDown Ms4 Script
Source Code Menu Help This Menu
written with ms4script
      

BASIC HELP : MS4BI by MS4script

2022 version 1.10

Chapter 3 : INSTRUCTION + FUNCTION

KEYWORD : STR_LEN

Definition

Returns the length of a given string.

Syntax

  	 	
	    integer := str_len ( char or text ); 
  	
	

Return Values

  The length of the string if successful, or 0 if the char or text is empty.

 

Example

  	 char    : $str:50 ;
         integer : i;
		
		$str := "abcdef";
              i := str_len($str); // i= 6 
         display i;
	
	

Remarks

a := b := Assigns the value of b as a new value for a.

See Also

str_str ..



KEYWORD : STR_FORMAT

Definition

Buffer String by format to the standard output . If format includes format specifiers (subsequences beginning with %), the additional arguments following format are formatted and inserted in the resulting string replacing their respective specifiers.

Syntax

  	 	
	    str_format ( string buffer, format string);
  	
	

Return Values

  none
    
  

Example

  
INTEGER : Exit_TRANS1 ,Ival := 22544 ;
FLOAT : Fval Dec(2) := 1123456789.00;
LONG : Lval := 2147483645;
DOUBLE : Dval Dec(2) := 1234567890123.12 ;
Text : nTextFormat, ntextEx:="Example Format";
 
Clear nTextFormat;
Str_Format(nTextFormat, "This is a <%s> : integer <%i>, float <%f> , double <%d>  , long <%l>",
ntextEx,Ival,Fval,Dval,Lval)	;
Display "nTextFormat : ",nTextFormat Column 40;


** output : nTextFormat : This is a  : integer <22544>, float <1123456768.00> , double <1234567890123.12>  , long <2147483645>...
	
 	

Remarks

- The variables are defined using the following convention: %i integer, %l long ,%f float ,%d double , %s char or text - Goto to see : Num_str, Str_num, format



KEYWORD : STR_STR

Definition

Finds the first occurrence of a string.

Syntax

  	 	
	    str_str ( char or text ) return(integer,string);
  	
	

Return Values

  Returns the position of the string and returns the portion of the string if successful.
    
  

Example

  	 text    :  zStrStr, zSchema := " example : davzacum vitaeddd CREATE TABLE (integer .....";  	
     	 integer :  X  ;
		  
 		 display" Found string :CREATE TABLE -->   ";
	  		   str_str(zSchema, "CREATE TABLE"  ) return (x, zstrstr);
			if(x > 0) then
			 display " position : ",x  , " Schema : ",zStrstr; 
			end_if ;
	
	** output : 	 return position 29, string ;CREATE TABLE (integer .....
	
 	

Remarks

If not found: returns 0 as the position and voids the value of the string . Case-insensitive.



KEYWORD : STR_REPLACEALL

Definition

Replaces all occurrences of a string.

Syntax

  	 	
	    str_ReplaceAll ( string , 'search' string, 'replace' string ) ; 
  	
	

Example

  	text : LCurrentDir   := "H:\MandragorePlanete\MS4BI\zDemo-Simple\ExampleString"   ;
 
			**REPLACE ALL STRING : \ by /  
 
 		     Str_ReplaceAll(LcurrentDir ,"\","/");
  
 ** output : H:/database1.db/MS4BI/zDemo-Simple/ExampleString
 	

Remarks

Case-insensitive

See Also

str_len , str_str ..



KEYWORD : STR_TOUPPER

Definition

Converts a string from lower to upper case.

Syntax

  	 	
	    str_toupper ( string);  
  	
	

Example

  	  	
   text    :   zSchema := " example : davzacum vitaeddd CREATE TABLE (integer .....";  	
    			
				str_toupper(zSchema )  ;
   
   ** output : EXAMPLE : DAVZACUM VITAEDDD CREATE TABLE (INTEGER .
   

Remarks

See Also

str_len , str_str ..



KEYWORD : STR_TOLOWER

Definition

Converts a string from upper to lower case

Syntax

  	 	
	    str_tolower ( string) ; 
  	
	

Example

  	  	
   text    :   zSchema := " example : davzacum vitaeddd CREATE TABLE (integer .....";  	
  	  			
				str_tolower(zSchema )  ;
  
   ** output :  example : davzacum vitaeddd create table (integer ..
   

Remarks

See Also

str_len , str_str ..



KEYWORD : STR_ISNUMERIC

Definition

Tests if the string is numeric

Syntax

  	 	
	    integer := str_isNumeric( string) ; 
  	
	

Example

  	  	
	text    : zSchema1 := " example : davzacum vitaeddd", zSchema2 :="123456.12" ;  	
	integer : x ;
	double  : dval Dec(2);
		 display"1- is numeric ? : ", zSchema1 ;
	  			x := str_isNumeric(zSchema1);
	 			if(x = 0)  
				then
		 		display " Schema is not numeric ",zSchema1; 
				else
				display " Schema is numeric ",zSchema1; 
				end_if ;
   ** output : Schema is not numeric example : davzac..
   

Remarks

If not numeric, returns 0, otherwise returns 1

See Also

Num_str, Str_num



KEYWORD : CONCATENE

Definition

Concatenates strings.

Syntax

  	 	
	    concatene   string or literal,string or literal... into string_output ; 
  	
	

Example

  	 
   text : zSchema1 := "example : davzacum vitaeddd", zSchema2 :="CREATE TABLE (integer ..";
   text : outputTEXT;  	
   				Concatene  zSchema1, "-NEXT--->",zSchema2,"///[end]" into outputTEXT  ;
		 		display "concatene Schema1, ..2 ... : ",outputTEXT; 


  ** output : example : davzacum vitaeddd-NEXT->CREATE TABLE (integer ..///[end] 

   

Remarks

Not used with float or integer or long or double data types, use Num_str to convert these to a string.

See Also

Num_str ..



KEYWORD : STR_REVERSE

Definition

Reverses a string.

Syntax

  	 	
	    str_reverse ( string)  ;
  	
	

Example

  	  	
   text    :   zSchema := " example : davzacum vitaeddd CREATE TABLE (integer .....";  	
   			
			str_reverse(zSchema )  ;
				 		  
	   
   ** output : regetni( ELBAT ETAERC dddeativ mucazvad : elpmaxe
   

Remarks

See Also

str_len , str_str ..



KEYWORD : STR_SORT

Definition

Sorts strings.

Syntax

  	 	
	    str_sort( string)  ;
  	
	

Example

  	  	
   text    :   zSchema1 := " example : davzacum vitaeddd CREATE TABLE (integer .....";  	
  	 display" sort : example : davzacum vitaeddd CREATE TABLE (integer .....' ";
	   			str_sort(zSchema )  ;
		 		display "sort Schema : ",zSchema; 

   ** output : (.....:AABCEEELRTTaaaacddddeeeeegiilmmnprttuvvxz
   

Remarks

Sorts in ascending order

See Also

str_len , str_str ..



KEYWORD : Str_num

Definition

Converts strings to numeric data types.

Syntax

  	 
  	    Str_num   string  to Numeric  ;  
  	
	

Example

  	  	long : Lval;
            text : Wordnumeric := "12345";
			
          Str_num   Wordnumeric to Lval ;
		  

Remarks

Str_IsNumeric() . Numeric can be float or long or integer or double data type

See Also

str_isnumeric, str_len , str_str ..



KEYWORD : Num_str

Definition

Converts numeric values to character strings.

Syntax

  	 	
	   Num_str   Numeric   to string format string ;  
  	
	

Example

  	  	float : fval dec(2) :=  12345,85 ;
            text : Wordnumeric  ;
		
          Num_Str  Fval to Wordnumeric Format "05.2";
		  

Remarks

Str_IsNumeric() . Numeric is float or long or integer or double data type.
Format is optional

See Also

Str_num ..



KEYWORD : EXTRACTSTRING

Definition

Extracts a string of characters from position n in the chain

Syntax

  	 	
	    string := ExtractString(string: position , nb character ) ;   
		or
  	    string :=  string: position , nb character   ;   
		
	

Example

  
   TEXT : Word1  := "EU" +"RE"+ "KA" ,CharExtract ;
  
Display "   Word1  : " , Word1 ;
CharExtract := ExtractString(word1:3,4) ; 

Display "1   extract    word1 :--> ",word1," CharExtract: 3  posit / 4charact : ",CharExtract;

CharExtract :=  word1:2,5;

Display "2   extract    word1 :--> ",word1," CharExtract: 2  posit / 5charact : ",CharExtract;

** output 1 : REKA
** output 2 : UREKA
		  

Remarks

-do not use float or long or integer or double data types.
-position , nb charact : integer possible.

See Also

Str_num ..

Interested in joining us? contact@mgplanete.com
The Mg Planete team


Copyright 2022 by Mandragore Planete

the official sites :
mgplanete.com
getms4bi.com
demos.ms4bi.com
help.ms4bi.com
ms4script.com

Download

official site :
getms4bi.com

Our purpose : Keep it simple !


written with ms4script
  • help 01.010.2022.8

MS4BI in 5 minutes