MS4BI HELP 2019

by MS4script
01-Introduction
Preface & Copyright
Getting started
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
Connect DB Create, delete
Import DataSource Import, Consolidation
Administration Admin, User
05- Sql-Query
Sql
Query Form : BTS,SHOW
Grid option
06- Charts
Forms Show, 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.
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 Special
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
14- Cloud.
Account Open
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 2019 version 1

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 : ConverNumeric, ConverString, 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:\MondaySoftware\MS4BI\zDemo-Simple\ExampleString"   ;
 
			**REPLACE ALL STRING : \ by /  
 
 		     Str_ReplaceAll(LcurrentDir ,"\","/");
  
 ** output : H:/MondaySoftware/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

ConverNumeric, ConverString



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 convernumeric to convert these to a string.

See Also

ConverNumeric ..



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 : CONVERSTRING

Definition

Converts strings to numeric data types.

Syntax

 	 
  	    Converstring   string into Numeric  ;  
  	
	

Example

 	  	long : Lval;
            text : Wordnumeric := "12345";
			
          Converstring   Wordnumeric inTo 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 : CONVERNUMERIC

Definition

Converts numeric values to character strings.

Syntax

 	 	
	    Convernumeric   Numeric into string format string ;  
  	
	

Example

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

Remarks

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

See Also

ConverString ..



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

ConverString ..

Interested in our project? contact@monday-software.com
The Monday Software team


Copyright 2020 by Monday Software

the official sites :
www.monday-software.com
www.ms4bi.com
demos.ms4bi.com
getms4bi.com
getms4bifree.com
cloud.ms4bi.com
cloud.testing.ms4bi.com
www.ms4script.com

Our purpose : Keep it simple !


written with ms4script
  • MS4BI v.01.0027.01.2020
  • MS4BIRE v.01.0021.10.2019
  • MS4SCRIPT v.01.0027.01.2020
  • help 06/2019

MS4BI in 5 minutes