Form_Settings


In case of error received in any of the Error functions, it can be obtained using _DB_WARNINGERRORERRORMESSAGE

The parameters Function_To_Execute_Before_Update,Function_To_Execute_After_Update,

Function_To_Execute_After_Retrieving,Function_To_Execute_If_No_Network_Error

may contain one parameter.

Example: Function_To_Execute_Before_Update=AnyFunction(param1)

Parameters:

Url [string] - DB Server

( Example: Url="http://sdg.muents.com" )

Name [ string ] - Name for this Automatic Form

Table_Name [string] - Table Name

( Example: Table_Name="db_forms_test" )

Key_Field [string] - Field Name

( Example: Key_Field="id" )

Key_Value_Variable [variable name] - Variable name that contains the Key Value

( Example: Key_Value_Variable=current_rec )

- Any reference to @@ will be replaced with a parameter linked to the Key_Value_Variable.

Key_Value_Variable2 [variable name] - Variable name that contains the Key Value

( Example: Key_Value_Variable2=current_rec )

- Any reference to @@2 will be replaced with a parameter linked to the Key_Value_Variable2.

Key_Value_Variable3 [variable name] - Variable name that contains the Key Value

( Example: Key_Value_Variable3=current_rec )

- Any reference to @@3 will be replaced with a parameter linked to the Key_Value_Variable3.

Horizontal_Scroll [ boolean ] - false is the default; it is used to enable or disable the horizontal scroll.

( Example: Horizontal_Scroll=true )

Vertical_Scroll [ boolean ] - false is the default; it is used to enable or disable the vertical scroll.

( Example: Vertical_Scroll=true )

Always_Scroll [ boolean ] - false is the default; it is used to keep active the scroll system.

( Example: Always_Scroll=true )

Vertical_Displacement [ numeric ] - 500 is the default; it is used to let the user scroll up and down an area

similar to the keyboard. It only applies when there is Vertical_Scroll set to true.

( Example: Vertical_Displacement=700)

Optional Parameters:

Textfields_BorderColor_Alpha [ string ] - This is the Border properties for the textfields and textboxes

( Example: Textfields_BorderColor_Alpha=0,0,0,1 )

Textfields_BackColor_Alpha [ string ] - This is the BackColor properties for the textfields and textboxes

( Example: Textfields_BackColor_Alpha=1,1,1,1 )

Forced_a [string] - Force to run only in this Activity

Background=$R_Image_back.png ( It sets a background for the form )

No_Background [ string ] - false is the default; it means that the background content will be covered with a grey image.

- true to avoid covering the back of the screen.

In this case you are responsible for removing the Selection list before leaving this screen.

Spinner_Image [string] - You can optionally provide an spinner image.

- It consist of seven parameters. Image,x,y,width,height,step_rotation,miliseconds

( Example: Spinner_Image=spinner.png,240,427,50,50,20,1000

Custom_FontName [string]

FontSize [Numeric]

Function_With_Custom_Format=AnyFunction - Function to apply custom format for the automatic fields.

- Still it runs first the _Standard_Settings() and afterwards

it runs the custom format function.

( Example: Function_With_Custom_Format=Custom_Format )

function Custom_Format()

_default_button_backColor_RGB_Alpha_(0.5,0,0,0.5) -- Add or Modify Some more.

end

Function_To_Execute_Before_Update=AnyFunction - Function to execute before update the data

-- It can be used for validation purposes.

-- If you want to cancel the update you can use _Cancel_Update_Form()

Function_To_Execute_After_Update=AnyFunction - Function to execute after the data has been updated

Function_To_Execute_After_Retrieving=AnyFunction - Function to run once the retrieving of the selection has been completed.

Function_To_Execute_If_Error_With_Retrieve=AnyFunction - Function to run if there is an error retrieving the data.

Function_To_Execute_If_Error_With_Update=AnyFunction - Function to run if there is an error updating the data.

Function_To_Execute_If_No_Network_Error=AnyFunction - Function to run if there is a `No Network` error.

No_Network_Message_SP - Custom "No Network" message when retrieving

If Function_To_Execute_If_No_Network_Error is provided,

the No_Network_Message_SP will not be displayed.

To_Front_After_Creation_And_Retrieve_01 ( string ) - It is used to specify what you want to move to to front after the

- list has been fully displayed.

To_Front_After_Creation_And_Retrieve_02 ... to _05 ( string ) - You have up to 5 to specify objects to front.

[ In those options you can use _Close_Form() before to move to another activity. ]

Fields (array) (one element per line).

Every line consisted of:

"Field_Name","PlaceHolder",x,y,width,height,keyboard_type

If width,height are not provided, the previous one will be used.

If Field_Name matches a field from the Retrieved query the value will be displayed and updated.

If keyboard_type is not provided, no-emoji will be used.

Keyboard options:

default : the default keyboard, supporting general text, numbers and punctuation.

number : a numeric keypad.

decimal : a keypad for entering decimal values.

phone : a keypad for entering phone numbers.

url : a keyboard for entering website URLs.

email : a keyboard for entering email addresses.

no-emoji : the default keyboard, supporting general text, numbers and punctuation but does not allow emoji to be typed.

secured : mostly used for passwords

hidden - used to create variables for internal calculations before and after an update.

Example:

Fields={

"first_name","First Name",240,170,440,40

}

Example2:

"Correo_Electronico","Correo Electronico",240,699,400,40,number

Fields_No_DB ( array ) ( one element per line.)

It works like the Fields (above) but they are not connected to any field from the database.

Keyboard hidden is not available for this field type.

Example:

Fields_No_DB={

"temp_password","Password",240,506,373,60,secured

}

Protected_Fields (array) (one element per line).

It creates labels so the user cant edit its contents.

Every line consisted of:

"Field_Name","PlaceHolder",x,y,width,height

If width,height are not provided, the previous one will be used.

If Field_Name matches a field from the Retrieved query the value will be displayed.

PlaceHolder are not used with protected fields (still you can pass them as reference)

Example:

Fields={

"first_name","First Name",240,170,440,40

}

FieldBoxes (array) (one element per line).

Every line consisted of:

"FieldBox_Name","PlaceHolder",x,y,width,height

If width,height are not provided, the previous one will be used.

If Field_Name matches a field from the Retrieved query the value will be displayed and updated.

Example:

FieldBoxes={

"Note","Details",240,780,440,150

}

Protected_FieldBoxes (array) (one element per line).

It creates Textboxes without the ability to edit its contents.

Every line consisted of:

"FieldBox_Name","PlaceHolder",x,y,width,height

If width,height are not provided, the previous one will be used.

If Field_Name matches a field from the Retrieved query the value will be displayed.

Example:

FieldBoxes={

"Note","Details",240,780,440,150

}

Switches (array) (one element per line).

"Field_Name",x,y

If Field_Name matches a field from the Retrieved query the value will be displayed and updated.

Example:

Switches={

"allow_updates",431,682

}

Checkboxes (array) (one element per line).

"Field_Name",x,y

If Field_Name matches a field from the Retrieved query the value will be displayed and updated.

Example:

Checkboxes={

"test_check",402,682

}

RadioButtons (array) (one element per line).

"Field_Name",x,y,"value","group_name"

If Field_Name matches a field from the Retrieved query the value will be displayed and updated.

Example:

RadioButtons={

"Sex1",166,130,"M","sex"

"Sex2",266,130,"F"

"Level1",166,230,"0","how_serious"

"Level2",266,230,"1"

"Level3",366,230,"2"

"Level4",466,230,"3"

}

Buttons_Update (array) (one element per line).

"Button_Name","Button_Text",x,y,width,height

This button triggers the Update of all the data fields.

You can set multiple ones. All will do the same.

Example:

Buttons_Update={

"update_data","Update Data",240,914,438,92

}

Buttons_Process (array) (one element per line).

"Button_Name","Button_Text",x,y,width,height,Function_to_Run

This button is used to execute a process.

Example:

Buttons_Process={

"flying_box","A",33,579,30,30,Display_Popup

}

Buttons_Process_DB (array) (one element per line).

"Button_Name","Button_Text",x,y,width,height,Function_to_Run

This button is used to execute a process.

If Field_Name matches a field from the Retrieved query the value will be displayed.

Example:

Buttons_Process_DB={

"flying_box","A",33,579,30,30,Display_Popup

}

Labels (array) (one element per line).

"Label_Name","Label_Text",x,y,width,height,align,fontbold,fontsize,font_RGBA

If Field_Name matches a field from the Retrieved query the value will be displayed.

The Parameters align,fontbold,fontsize,font_RGBA are Optionals

font_RGBA must be passed separated by `_`. Example: 1_0_0_1

Example:

Labels={

"first_name","ABC",240,50,370,40

}

Labels_No_DB (array) (one element per line).

"Label_Name","Label_Text",x,y,width,height,align,fontbold,fontsize,font_RGBA

The Parameters align,fontbold,fontsize,font_RGBA are Optionals

font_RGBA must be passed separated by `_`. Example: 1_0_0_1

It works like a Label but it is not connected to the database.

Example:

Labels_No_DB={

"first_name","ABC",240,50,370,40

}

Images_Local (array) (one element per line).

"Image_Name","Image_File_Name",x,y,width,height,Radio,Function_To_Execute

Example:

Images_Local={

"flag","$R_Image3.png",390,45,140,80,0,Display_Popup2

}

Images_Remote (array) (one element per line).

"Image_Name","Image_Name_Remote_URL",x,y,width,height,Radio,Function_To_Execute

Example (Static):

Images_Remote={

"photo1","http://sdg.muents.com/users_image/abc1.png",240,44,80,80,0,Display_Popup3

}

Example (Dynamic using the Key_Id):

Images_Remote={

"photo1","http://sdg.muents.com/users_image/abc@@.png",240,44,80,80,0,Display_Popup3

}

Images_Remote_Select (array) (one element per line).

"Image_Name","Image_Name_Remote_URL",x,y,displayed_width,displayed_height,Radio,set_storage_width,set_storage_height,Preserve_Aspect,Compression_Factor,Use_Resize_Tool,Function_to_execute_when_completed

Preserve_Aspect, if it is set to true the selected image from the gallery will be resized to fit inside an area of set_storage_width x set_storage_height

if it is set to false the selected image will be resized to match set_storage_width x set_storage_height

Compression_Factor is a decimal value from 0.01 to 1 where 0 is full compression (low quality) and 1 is (full quality)

Use_Resize_Tool: (default is false). If set to true, it will handle the selection process and resize with _Resize_Picture_Tool

The Function_to_execute_when_completed (optional) is executed once the resizing and upload has been completed

Example:

Images_Remote_Select={

"photo2","http://sdg.muents.com/users_image/abc2.png",120,44,80,80,0,1300,1300,false,0.35,false

}

Example 1 ( Using Individual Lines for Each Configuration ):

_Form_Settings

Url="http://sdg.muents.com"

Table_Name="db_forms_test"

Key_Field="id"

Key_Value_Variable=current_rec

Function_With_Custom_Format=Custom_Format

Background=$R_Image_back.png

Convert_to_Latino=true

Fields={

"first_name","First Name",240,170,440,40

"last_name","Last Name",240,270

"email","Email",240,366

"special_requests","Special Requests (optional)",240,461

"phone","Phone",295,595,325

}

FieldBoxes={

"Note","Details",240,780,440,150

}

Fields_No_DB={

"temp_password","Password",240,506,373,60,secured

}

Switches={

"allow_updates",431,682

}

Checkboxes={ { "test_check",402,682 } }

RadioButtons={

"Sex1",166,130,"M","sex"

"Sex2",266,130,"F"

"Level1",166,230,"0","how_serious"

"Level2",266,230,"1"

"Level3",366,230,"2"

"Level4",466,230,"3"

}

Buttons_Update={

"update_data","Update Data",240,914,438,92

}

Buttons_Process={

"flying_box","A",33,579,30,30,Display_Popup

}

Labels={

"first_name","ABC",240,50,370,40

}

Images_Local={

"flag","$R_Image3.png",390,45,140,80,0,Display_Popup2

}

Images_Remote={

"photo1","http://sdg.muents.com/users_image/abc1.png",240,44,80,80,0,Display_Popup3

}

Images_Remote_Select={

"photo2","http://sdg.muents.com/users_image/abc2.png",120,44,80,80,0,1300,1300,false,0.35

}

_Form_End

Example2: ( Compacting the code using { } )

_Form_Settings

{ Url="http://sdg.muents.com" } { Table_Name="db_forms_test" } { Key_Field="id" } { Key_Value_Variable=current_rec } { Function_With_Custom_Format=Custom_Format } { Background=$R_Image_back.png }

Fields={ { "first_name","First Name",240,170,440,40 } { "last_name","Last Name",240,270 } { "email","Email",240,366 } { "special_requests","Special Requests (optional)",240,461 } { "phone","Phone",295,595,325 } }

FieldBoxes={ {"Note","Details",240,780,440,150 } }

Switches={ { "allow_updates",431,682 } }

Buttons_Update={ { "update_data","Update Data",240,914,438,92 } }

Buttons_Process={ { "flying_box","A",33,579,30,30,Display_Popup } }

Labels={ { "first_name","ABC",240,50,370,40 } }

Images_Local={ {"flag","$R_Image3.png",390,45,140,80,0,Display_Popup2 } }

Images_Remote={ { "photo1","http://sdg.muents.com/users_image/abc1.png",240,44,80,80,0,Display_Popup3 } }

Images_Remote_Select={ { "photo2","http://sdg.muents.com/users_image/abc2.png",120,44,80,80,0,1300,1300,false,0.35 } }

_Form_End

if a Function with Custom Format is not provided the following formats will be applied:

_default_text_isbackColorVisible_(false)

_default_text_isborderVisible_(false)

_default_text_borderColor_RGB_Alpha_(0,0,0,0)

_default_text_backColor_RGB_Alpha_(0,0,0,0)

_default_text_foreColor_RGB_Alpha_(0.7,0.7,0.7,1)

_default_button_isbackColorVisible_(true)

_default_button_backColor_RGB_Alpha_(0,0,0,0.01)

_default_button_borderColor_RGB_Alpha_(0,0,0,0)

_default_button_foreColor_RGB_Alpha_(0,0,0,1)

_default_backColorOver_RGB_Alpha_(0.8,0.8,0.8,0.2)

_default_foreColorOver_RGB_Alpha_(0,0,0,1)

_default_borderColorOver_RGB_Alpha_(0,0,0,0)

_default_cornerRadius_(0)

_default_align_("left")

_default_align_buttons_("center")

_default_anchorXY_(0.5,0.5)


Form_End


Selection_End



Selection_Row_Adjust_Y


It has been designed to be used inside Function_With_Custom_Format_Cols2 and Function_With_Custom_Format_Cols3.

Selection_Settings


* It is the initial tag for an automatic selection list.

* The selection can be called as: _Selection_Test2() where Test2 is the Name of the selection.

* It can be called from anywhere in the program (except beforeload), then you can get the result of what was clicked

by specifying a function Function_To_Execute_After_Selection.

There you can read the selected values using the variables: _Selected_Data1 .. _Selected_Data10

* After it runs, you can access the number of records found by reading the variable _Selection_Rows

In order to accomplish that you must set a function using the parameter Function_To_Execute_After_Retrieving

* In case of error received in any of the Error functions, it can be obtained using _DB_WARNINGERRORERRORMESSAGE

* The parameters Function_To_Execute_After_Selection,Function_To_Execute_After_Retrieving,

Function_To_Execute_After_Cancel,Function_To_Execute_If_No_Network_Error

may contain one parameter:

Example: Function_To_Execute_After_Selection=AnyFunction(Param1)

The possible parameters are:

Url [string] - DB Server

( Example: Url="http://sdg.muents.com" )

Name [ string ] - Name for this Selection list

Query [ string ] - Query to retrieve data from the server.

- You can include as many columns you want.

- Only the Cols included in the parameter `Cols` will be used.

( Example: Query="select * from planets order by Planet_Name" )

- Any reference to @@, @@2, @@3 will be replaced with a parameter linked

to the Key_Value_Variable, Key_Value_Variable2, Key_Value_Variable3.

Only_Display [boolean] - It only list results. It doesn`t have links attached to the records.

( default = false )

Forced_a [string] - Force to run only in this Activity

Selections are designed to be executed only on the Form in which they were defined unless

you set this parameter Forced_a.

You can also set this parameter to `*` to indicate that the selection can be called from anywhere.

Key_Value_Variable [variable name] - Variable name that contains the Key Value

( Example: Key_Value_Variable=current_rec )

- Any reference to @@ will be replaced with a parameter linked to the Key_Value_Variable.

Key_Value_Variable2 [variable name] - Variable name that contains the Key Value

( Example: Key_Value_Variable2=current_rec )

- Any reference to @@2 will be replaced with a parameter linked to the Key_Value_Variable2.

Key_Value_Variable3 [variable name] - Variable name that contains the Key Value

( Example: Key_Value_Variable3=current_rec )

- Any reference to @@3 will be replaced with a parameter linked to the Key_Value_Variable3.

Selection_Cols [ numeric ] - number of cols from Left to Right that will be active as selection fields.

( default = 2)

( Example: Selection_Cols=2 )

Cols [ string array CSV ] - Names of the Fields included in the list

( Example: Cols="Id","Cod","Planet_Name","Diameter_Kms" )

( If the system detects the "Id" column, it will leave an area to the right of "Id" exclusively for scrolling. )

Cols_Width [ string array CSV ] - Widths for the Fields.

( Example: Cols_Width=60,80,80,200 )

( A width of 1 will hide the column )

Cols_Align [ string array CSV ] - Aligns for the Fields.

( Example: Cols_Align="left","left","left","right" )

Cols2 [ string array CSV ] - Names of the Fields included in the list

( Example: Cols2="Id","Cod","Planet_Name","Diameter_Kms" )

Cols2_Width [ string array CSV ] - Widths for the Fields.

( Example: Cols2_Width=60,80,80,200 )

( A width of 1 will hide the column )

Cols2_Align [ string array CSV ] - Aligns for the Fields.

( Example: Cols2_Align="left","left","left","right" )

Cols3 [ string array CSV ] - Names of the Fields included in the list

( Example: Cols3="Id","Cod","Planet_Name","Diameter_Kms" )

Cols3_Width [ string array CSV ] - Widths for the Fields.

( Example: Cols3_Width=60,80,80,200 )

( A width of 1 will hide the column )

Cols3_Align [ string array CSV ] - Aligns for the Fields.

( Example: Cols3_Align="left","left","left","right" )

Cols4 [ string array CSV ] - Names of the Fields included in the list

( Example: Cols4="Id","Cod","Planet_Name","Diameter_Kms" )

Cols4_Width [ string array CSV ] - Widths for the Fields.

( Example: Cols4_Width=60,80,80,200 )

( A width of 1 will hide the column )

Cols4_Align [ string array CSV ] - Aligns for the Fields.

( Example: Cols4_Align="left","left","left","right" )

Images_Height [ numeric ] - Image height. Default is 100

( Example: Images_Height=400 )

( If one field contains data starting with $D_, $R_, $T_ or $C_ the system assumes it is an image )

( In order for this to work properly the images must be preloaded before the _Select operation )

Label_Add_Height [ numeric ] -Increases the height of the labels.

( By default is 0. )

Automatic_Label_Height [ boolean ] - It calculates the highest label on the row

and it adapts the next gap to make this row fully visible.

( By default is false )

Images_Dy [ numeric ] - Image Dy. Default is 0

( It changes the y position of the images )

Row_Background [ image] ( It sets a background for each row the list )

( Requires, FullPathImage,Width,Height,Alpha,DX,DY )

( Example: Row_Background=$R_Image_back.png,400,80,0.3,10,5

Button_Cancel [ string ] - x,y,width,height,image_name

It creates in the main display and set to front a button to close the list.

( Example: Button_Cancel=400,30,100,30,$R_cancel_list.png )

Function_To_Execute_After_Cancel [ function ] - Function to run once the selection has been cancelled.

( Example: Function_To_Execute_After_Cancel=test )

Left_Margin [ numeric ] - Margin to leave at the left side of the List.

- If you set this to -1, the list will be centered on the screen.

( Example: Left_Margin=-1 )

Top_Margin [ numeric/variable ] - Margin from the top of the screen.

( Example: Top_Margin=80 )

Bottom_Margin [ numeric/variable ] - Margin at the bottom of the screen. ( Default is 0 )

Record_Touch_Delay [ numeric/variable ] - Delay to activate touch in a record. ( Default is 70 )

Function_With_Custom_Format [ function ] - Function to apply a custom format to your list.

- It still runs first the _Standard_Settings_for_Selections() and

afterwards runs your Function_With_Custom_Format

( Example: Function_With_Custom_Format=List_Format )

Function_With_Custom_Format_Cols1 [ function ] - Function to apply a custom format to your list.

- It runs before the Cols1 elements are displayed

afterwards runs your Function_With_Custom_Format

( Example: Function_With_Custom_Format_Cols1=List_Format )

- If you use this function, you must set Function_With_Custom_Format_Cols2

and Function_With_Custom_Format_Cols3 to restore the custom format for

all the Cols.

Function_With_Custom_Format_Cols2 [ function ] - Function to apply a custom format to your list.

- It runs before the Cols2 elements are displayed

afterwards runs your Function_With_Custom_Format

( Example: Function_With_Custom_Format_Cols2=List_Format )

- If you use this function, you must set Function_With_Custom_Format_Cols1

and Function_With_Custom_Format_Cols3 to restore the custom format for

all the Cols.

Function_With_Custom_Format_Cols3 [ function ] - Function to apply a custom format to your list.

- It runs before the Cols3 elements are displayed

afterwards runs your Function_With_Custom_Format

( Example: Function_With_Custom_Format_Cols3=List_Format )

- If you use this function, you must set Function_With_Custom_Format_Cols1

and Function_With_Custom_Format_Cols2 to restore the custom format for

all the Cols.

Background [ string ] - It applies a background image over the semi-transparent `gray` default screen.

( Example: Background=$R_Image2.png )

Display_Cols_Names [ boolean ] - true : Displays the Col Names at the top of the list.

false : Do not displays the Col Names.

( Example: Display_Cols_Names=false )

Gap_After_Cols_Names [ numeric ] - If Cols Names are being displayed, you can specify an space

to leave a gap after this Col Names and the next section.

( Example: Gap_After_Cols_Names=30 )

Gap_Between_Lines [ numeric ] - You can specify how many pixels you want to leave as a gap between lines.

( Example: Gap_Between_Lines=0 )

Gap_Between_Records [ numeric ] - You can specify how many pixels you want to leave as a gap between records.

( Example: Gap_Between_Records=0 )

Title_On_Top [ string ] - You can specify if you want a Title on Top.

( Example: Title_On_Top="Seleccionar un Planeta" )

No_Background [ string ] - false is the default; it means that the background content will be covered with a grey image.

- true - to avoid covering the back of the screen.

In this case you are responsible for removing the Selection list before leaving this screen.

Gap_After_Title_On_Top [ numeric ] - You can specify how many pixels will skip after the Title on top.

- It only applies if you have specified a Title on Top.

( Example: Gap_After_Title_On_Top=30 )

Spinner_Image [string] - You can optionally provide an spinner image.

- It consist of seven parameters. Image,x,y,width,height,step_rotation,miliseconds

( Example: Spinner_Image=spinner.png,240,427,50,50,20,1000

Horizontal_Scroll_Disabled [ boolean ] - You can set this to true if you want to disable the horizontal Scroll.

Vertical_Scroll_Disabled [ boolean ] - You can set this to true if you want to disable the vertical scroll.

Custom_FontName [ string ] - You can specify the name of a custome font name.

FontSize [ string ] - You can set the font size.

ForeColor_Cols_Names [ string ] - Optionally you can change here the default for the colors of the Cols Names.

( Example: ForeColor_Cols_Names="0,0,0,1" )

BackColor_Cols_Names [ string ] - Optionally you can change here the default for the background colors of the Cols Names.

( Example: BackColor_Cols_Names="1,1,1,1" )

ForeColor_Title_On_Top [ string ] - Optionally you can change here the default for the colors of the Title on Top.

( Example: ForeColor_Title_On_Top="0,0,1,1" )

BackColor_Title_On_Top [ string ] - Optionally you can change here the default for the background colors of the Title on Top.

( Example: BackColor_Title_On_Top="1,1,0,1" )

Form_Name_To_Fill [ string ] - Name of Form to Fill with this Selection list

Field_To_Fill_With_Selection_01 [ string ] - You can specify to fill automatically one of the fields of the form.

( Example: Field_To_Fill_With_Selection_01="email" )

Column_To_Use_For_Fill_01 [ numeric ] - You can specify the number of the column data used to fill the field indicated above.

( Example: Column_To_Use_For_Fill_01=3 )

Field_To_Fill_With_Selection_02 .. to 05 [ string ] - The same as the number 01.

Column_To_Use_For_Fill_02 .. to 05 [ numeric ] - The same as the number 01

Function_To_Execute_After_Selection [ function ] - Function to run once the selection has been completed.

( Example: Function_To_Execute_After_Selection=test )

Function_To_Execute_After_Retrieving [ function ] - Function to run once the retrieving of the selection has been completed.

( Example: Function_To_Execute_After_Retrieving=retrieving_completed )

Function_To_Execute_If_Error_With_Retrieve=AnyFunction - Function to run if there is an error retrieving the data.

Function_To_Execute_If_No_Network_Error=AnyFunction - Function to run if there is a `No Network` error.

AutoUpdate ( boolean ) - You can specify if you want to update the database automatically after a value has been selected.

( By default is false )

( Example: AutoUpdate=false )

To_Front_After_Creation_And_Retrieve_01 ( string ) - It is used to specify what you want to move to to front after the

- list has been fully displayed.

To_Front_After_Creation_And_Retrieve_02 ... to _05 ( string ) - You have up to 5 to specify objects to front.

[ In those options you can use _Close_Form() before to move to another activity. ]

No_Network_Message_SP [ string ] - Message to display in case of network problems.

Bottom_Image [ string ] - Image to set at the bottom of the selection list

( Example: Bottom_Image="$R_Backgrounds/MyVehicles.png" )

Bottom_Text [ string ] - Text to set at the bottom of the selection list

( Example: Bottom_Text="This is the text" )

Bottom_Text_ForeColor [ string ] - ForeColor for the text at the bottom

( By default is "0,0,0,1" )

( Example: Bottom_Text_ForeColor="0,0,0,1" )

Bottom_Text_BackColor [ string ] - BackColor for the text at the bottom

( By default is "1,1,1,0" )

( Example: Bottom_Text_BackColor="1,1,1,0" )

Bottom_Text_FontSize [ numeric ] - ForeSize for the text at the bottom

( By default is 20 )

Bottom_Text_Bold [ boolean ] - Bold true/false for the text at the bottom

( By default is true )

No_Records_Image [ string ] - Image to display if there are no records to show

( Example: No_Records_Image="$R_Backgrounds/MyVehicles.png" )

No_Records_Text [ string ] - Text to set at the bottom of the selection list in case there are no records to show

( Example: No_Records_Text="No Records Found" )

Example1:

_Selection_Settings

Name="Test2"

Url="http://sdg.muents.com"

Query="select * from planets order by Planet_Name"

Function_With_Custom_Format=List_Format

Background=$R_Image2.png

ForeColor_Cols_Names="0,0,0,1"

BackColor_Cols_Names="1,1,1,1"

Cols="Id","Cod","Planet_Name","Diameter_Kms"

Gap_After_Cols_Names=30

Cols_Width=60,80,80,200

Cols_Align="left","left","left","right"

Display_Cols_Names=false

ForeColor_Title_On_Top="0,0,1,1"

BackColor_Title_On_Top="1,1,0,1"

Title_On_Top="Select a Planet"

Gap_After_Title_On_Top=30

Gap_Between_Lines=0

Left_Margin=-1

Top_Margin=80

Custom_FontName=""

FontSize=20

Field_To_Fill_With_Selection_01="email"

Column_To_Use_For_Fill_01=3

Function_To_Execute_After_Selection=test

_Selection_End

Chat_End

Chat_Hide



Chat_Settings


* The Chat Group can be called as: _Start_Medical_Chat() where Medical is the Name of the chat group.

* The function Message_Sent_User_Function_To_Run may contain one parameter:

Example1: Message_Sent_User_Function_To_Run=AnyFunction(Param1)

Example2:

Enc1="548AE544859CF776FE4B"

Enc2="B51D065CD7DE8BB25FE1XX"

Chat_Group_Id=5

Chat_User_Id=23

_Start_Medical_Chat()

* The Chat Group can be closed as: _Close_Medical_Chat() where Medical is the Name of the chat group.

Example:

_Close_Medical_Chat()

* It can be called from anywhere in the program.

The possible parameters are:

Name [ string ] - Name for this Chat Session.

Url [string] - DB Server

( Example: Url="http://sdg.muents.com" )

Forced_a [string] - Force to run only in this Activity

Initial_Visible [boolean] - Indicates if the chat will be created visible or hidden

* Optional ( Default: true )

(Example: Initial_Visible=false )

Top_Buttons [boolean] - Indicates if buttons will be located at the top of the textbox (true)

* Optional ( Default: false )

(Example: Top_Buttons=true )

Top_Margin [numeric/variable] - Where the Chat starts at the top ( Y coordinate)

* Optional ( Default: 75 virtual pixels )

( Example: Top_Margin=120 )

Bottom_Margin [numeric/variable] - Number of pixels for bottom margin.

* Optional ( Default: 100 virtual pixels and that`s the minimum recommended )

( for Translation available. )

( The value 60 can be used with non-translation chats. )

( Example: Bottom_Margin=100 )

MultiLine [boolean] - Default is true ( Textbox with multiple lines allowed )

false ( Textfield - One single line allowed )

Message_Placeholder [string] - Placeholder for the Message Area

* Optional ( Default: Type any message ... )

( Example: Message_Placeholder="Teclee su mensaje aqui ..." )

Message_Area_Border_Visible [boolean] - Set border around the message area.

* Optional ( Default: true ).

Message_Area_Border_Color [r,g,b] - Set border color around the message area.

* Optional ( Default: 0,0,0 ).

( Example: Message_Area_Border_Color="1,0,0" )

Message_Area_Backcolor [r,g,b] - Set background color for the message area.

* Optional ( Default: 1,1,1 ).

( Example: Message_Area_Backcolor="0.9,0.9,0.9" )

Message_Area_Forecolor [r,g,b] - Set forecolor for the font used in the message area.

* Optional ( Default: 0,0,0 ).

( Example: Message_Area_Forecolor="0.1,0.1,0.1" )

Message_Area_Font_Size [Numeric] - Set the font size for the message area.

* Optional ( Default: 18 ).

( Example: Message_Area_Font_Size=20 )

Read_Only [Boolean] - ReadOnly value. ReadOnly mode only let you read the content of the Chat window.

* Optional ( Default: false ).

Adjust_Balloons_Height [numeric] - Number of pixels to adjust height of text balloons.

It only affects while running out of the Simulator.

* Optional ( Default is -18 )

Adjust_Balloons_Y_Time [numeric] - Number of pixels to adjust the time posted below text balloons.

It only affects while running out of the Simulator.

* Optional ( Default is -12 )

Extra_Gap_Between_Lines [numeric] - Extra Number of pixels between objects.

* Optional ( Default is 0 )

Messages_Table_Name [string] - DB Table Name for messages storage

* Optional ( Default is Chat_Messages )

( Example: Messages_Table_Name="Chat_Messages" )

Messages_Chat_Group_Field_Name [string] - Chat Group Field Id

* Optional ( Default is chat_id )

( Example: Messages_Chat_Group_Field_Name="chat_id" )

Messages_Chat_PostDate_Field_Name [string] - Message PostDate Field Name

* Optional ( Default is post_yyyymmddhhmmss )

( Example: Messages_Chat_PostDate_Field_Name="post_yyyymmddhhmmss" )

Messages_Chat_ReadDate_Field_Name [string] - Message ReadDate Field Name

* Optional ( Default is read_yyyymmddhhmmss )

* This field must be type `Text`, default set to ``

( Example: Messages_Chat_ReadDate_Field_Name="read_yyyymmddhhmmss" )

Messages_Chat_Read_by_Users [string] - List of users who read the message - Field Name

* Optional ( Default is read_by_users )

* This field must be type `Text`, default set to ``

( Example: Messages_Chat_ReadDate_Field_Name="read_yyyymmddhhmmss" )

Messages_Chat_Text_Message_Field_Name [string] - Message Body Field Name

* Optional ( Defaults is Description )

* This field must be type `Text`

( Example: Messages_Chat_Text_Message_Field_Name="Description" )

Messages_Chat_Source_Id_Field_Name [string] - Message Source Id Field Name

* Optional ( Defaults is Source_id )

( Example: Messages_Chat_Source_Id_Field_Name="Source_id" )

Messages_Chat_Image_Width_Field_Name [string] - Message Image Width Field Name

* Optional ( Defaults is Width )

( Example: Messages_Chat_Image_Width_Field_Name="Width" )

Messages_Chat_Image_Height_Field_Name [string] - Message Image Height Field Name

* Optional ( Defaults is Height )

( Example: Messages_Chat_Image_Height_Field_Name="Height" )

Messages_Chat_Audio_Length_Field_Name [string] - Message Audio Length Field Name

* Optional ( Defaults is Audio_Length )

( Example: Messages_Chat_Audio_Length_Field_Name="Audio_Length" )

Images_Max_Capture_Width [string] - Capture Photo/Image Max Width

* Optional ( Default: 1000 )

( Example: Images_Max_Capture_Width=1000 )

Images_Max_Capture_Height [string] - Capture Photo/Image Max Height

* Optional ( Default: 1000 )

( Example: Images_Max_Capture_Height=1000 )

Images_Max_Capture_Compression [string] - Capture Photo/Image JPG Compression

* Optional ( Default: 0.8 )

( Example: Images_Max_Capture_Compression=0.8 )

Compression must be a value between 0.01 and 1 where 0 is the largest compression and any value near 1 is the best image quality

Message_Sent_User_Function_To_Run [function] - Function to run when the user sends a message

* Optional

( Example: Message_Sent_User_Function_To_Run=Send_Notification )

Message_Read_User_Function_To_Run [function] - Function to run when the user reads a message

* Optional

( Example: Message_Read_User_Function_To_Run=Read_Notification )

( )

( The function must have a parameter that will receive the id`s of the messages that have been Read )

( )

( function Read_Notificacion(resp) )

( _Print_Console(resp) )

( end )

Chat_Group_Id_Key_Variable [variable] - Variable containing the value for the Chat Group Id

Alphanumeric value, it can contain numbers but it can`t start with a number.

( Example: Chat_Group_Id_Key_Variable=Chat_Group_Id )

Chat_User_Id_Key_Variable [variable] - Variable containing the value for the Chat User Id

Alphanumeric value, it can contain numbers but it can`t start with a number.

( Example: Chat_User_Id_Key_Variable=Chat_User_Id )

Chat_User_Name_Key_Variable [variable] - Variable containing the value for the Chat User Name

Alphanumeric value, it can contain numbers but it can`t start with a number.

( Example: Chat_User_Name_Key_Variable=Chat_User_Name )

Chat_Primary_User_Prefix [string/variable] - Value to match vs the prefix of Chat_User_Name_Key_Variable.

* Optional

* It detects if the user is a primary user and it displays the name in a different color.

If it match the Prefix, that prefix gets removed from the Chat_User_Name_Key_Variable

( Example: Chat_Primary_User_Prefix="*" )

Chat_Primary_User_Suffix [string/variable] - Value to match vs the suffix of Chat_User_Name_Key_Variable.

* Optional

* It detects if the user is a primary user and it displays the name in a different color.

If it match the Suffix, that suffix gets removed from the Chat_User_Name_Key_Variable

( Example: Chat_Primary_User_Suffix="*" )

Chat_Primary_User_Function_To_Run [ function ] - Function to run when someone clicks on a Primary User_Name

* Optional

( Example: Chat_Primary_User_Function_To_Run=Primary_Clicked )

Chat_Primary_User_ForeColor [string] - RGB_Alpha Colors to display Primary User`s full names.

* Optional ( default = "0.8,0,0,1" )

( Example: Chat_Primary_User_ForeColor="0,1,0,1" )

Chat_Standard_User_ForeColor [string] - RGB_Alpha Colors to display Standard User`s full names.

* Optional ( default = "0.4,0.4,0.4,1" )

( Example: Chat_Standard_User_ForeColor="0.3,0.3,0.3,0.7" )

Chat_User_Name_Displayed [variable] - Indicate if you want visible full names above chat messages.

* Optional ( Default: false )

( Example: Chat_User_Name_Displayed=true )

Encryption_Key1_Variable [variable] - Variable containing the First Encryption Key ( At least 20 chars )

( Example: Encryption_Key1_Variable=Enc1 )

Encryption_Key2_Variable [variable] - Variable containing the Second Encryption Key ( At least 20 chars )

( Length of this key must be different to the length of the first key)

( Example: Encryption_Key2_Variable=Enc2 )

Image_Prefix [string] - Prefix for the images

* Optional ( Default: "notification" )

( Example: Image_Prefix="notification" )

Audio_Prefix [string] - Prefix for the audios

* Optional ( Default: "notification" )

( Example: Audio_Prefix="notification" )

Image_Audio_Folder [string] - Folder containing the Audios/Images at server side

* Optional ( Default: "users_image" )

( Example: Image_Audio_Folder="users_image" )

Background [image/variable] - Image name for full background

If the image is not passed with a symbol $, it will be treated as a variable.

( Example: Background=$R_Fondo.png )

Play_Audio_Icon [image/variable] - Image/Icon to play audios ( recommended 60x60 )

* Optional. If it is not provided the system will use the one mentioned in the example below.

( Example: Play_Audio_Icon=$R_play_audio_icon.png )

Downloading_Audio_Icon [image/variable] - Image/Icon to display downloading audios ( recommended 60x60 )

* Optional. If it is not provided the system will use the one mentioned in the example below.

( Example: Downloading_Audio_Icon=$R_audio_wait.png )

Close_Zoom_Icon [image/variable] - Image/Icon to close zoomed images. ( recommended 60x60 )

* Optional. If it is not provided the system will use the one mentioned in the example below.

( Example: Close_Zoom_Icon=$R_close_icon.png )

Spike_Green_Icon [image] - Image/Icon to set arrows in balloon messages.

* Optional. If it is not provided the system will use the one mentioned in the example below.

(Look for a sample spike at running Lu-C Folder.)

( Example: Spike_Green_Icon=$R_spike_green.png )

Spike_White_Icon [image] - Image/Icon to set arrows in balloon messages.

* Optional. If it is not provided the system will use the one mentioned in the example below.

(Look for a sample spike at running Lu-C Folder.)

( Example: Spike_White_Icon=$R_spike_white.png )

Icons_Scale [numeric] - Number between 1 and 3

* optional. Default is 1

( Example: Icons_Scale=2 )

Send_Message_Icon [image/variable] - Image/Icon to send messages.

* Optional. If it is not provided the system will use the one mentioned in the example below.

( Example: Send_Message_Icon=$R_send_icon.png )

Attach_Image_Icon [image/variable] - Image/Icon to attach and send images.

* Optional. If it is not provided the system will use the one mentioned in the example below.

( Example: Attach_Image_Icon=$R_attach_image.png )

Record_Audio_Icon [image/variable] - Image/Icon to record and send audios.

* Optional. If it is not provided the system will use the one mentioned in the example below.

( Example: Record_Audio_Icon=$R_record_icon.png )

Translation_Icon [image/variable] - Image/Icon to translate automatically.

* If you set this to "*", it will use the default system image.

* Optional. If you don`t provide one, this function won`t be available.

( Example: Translation_Icon=$R_translate.png )

Photo_Gallery_Icon [image/variable] - Image/Icon to select gallery photo.

* Optional. If it is not provided the system will use the one mentioned in the example below.

( Example: Photo_Gallery_Icon=$R_Photo_Gallery.png )

Take_Photo_Icon [image/variable] - Image/Icon to select take photo.

* Optional. If it is not provided the system will use the one mentioned in the example below.

( Example: Take_Photo_Icon=$R_Photo_Camera.png )

Attach_File_Icon [image/variable] - Image/Icon to execute a custom attach file external system.

* Optional. If it is not provided the system will use the one mentioned in the example below.

( Example: Attach_File_Icon=$R_Attach_File.png )

* By pressing that option the system will run the following function:

_Chat_" & auto_Chat_Name & "_Attach_File()

Attach_File_Visible [boolean] - Indicates if the option to attach files is going to be available.

* Optional. (Default: false )

( Example: Attach_File_Visible=true )

New_Incomming_Data_SoundFile [image] - Audio (mp3) to play when messages are received.

* Optional. If it is not provided the system will use the one mentioned in the example below.

( Example: New_Incomming_Data_SoundFile=$R_beep.mp3 )

Custom_FontName [string/variable] - Font Name ( Default is blank. The standard font will be used. )

* Optional ( Default: Blank )

If the FontName is not enclosed in double quotes, a variable will be used.

( Example: Custom_FontName="ArchitectsDaughter.ttf" )

( Example2: Custom_FontName=FontName_Variable )

Spinner_Image [string] - You can optionally provide an spinner image.

* Optional. If it is not provided the system will use the one mentioned in the example below.

- It consist of seven parameters. Image,x,y,width,height,step_rotation,miliseconds

( Example: Spinner_Image=spinner.png,240,427,50,50,20,1000 )

Text_Message_Font_Size [numeric/variable] - Font Size (Recommended = 20)

* Optional ( Default: 20 )

( Example: Text_Message_Font_Size=20 )

( Example: Text_Message_Font_Size=FontSize_Variable )

Text_Message_RGB_ForeColor_Green_Zone [string - RGB] - RGB color for the text inside the Green zone

* Optional ( Default: "0,0,0" )

( Example: Text_Message_RGB_ForeColor_Green_Zone="0,0,0" )

Text_Message_RGB_ForeColor_Green_Zone_Time [string - RGB] - RGB color for the time below the message at Green zones

* Optional ( Default: "0.5,0.5,0.5" )

( Example: Text_Message_RGB_ForeColor_Green_Zone_Time="0.5,0.5,0.5" )

Text_Message_RGB_ForeColor_White_Zone [string - RGB] - RGB color for the text inside the White zone

* Optional ( Default: "0,0,0" )

( Example: Text_Message_RGB_ForeColor_White_Zone="0,0,0" )

Text_Message_RGB_ForeColor_White_Zone_Time [string - RGB] - RGB color for the time below the message at White zones

* Optional ( Default: "0.5,0.5,0.5" )

( Example: Text_Message_RGB_ForeColor_White_Zone_Time="0.5,0.5,0.5" )

Text_Message_RGB_ForeColor_Center_Zone [string - RGB] - RGB color for the messages (dates) displayed at the center zone

* Optional ( Default: "0,0,0" )

( Example: Text_Message_RGB_ForeColor_Center_Zone="0,0,0" )

RGB_Alpha_Center_Zone [string RGB_Alpha] - RGB_Alpha for the background color for the Center Zone

* Optional ( Default: "0.41,0.61,0.87,1" )

( Example: RGB_Alpha_Center_Zone="0.41,0.61,0.87,1" )

RGB_Alpha_Green_Zone [string RGB_Alpha] - RGB_Alpha for the background color for the Green Zone

* Optional ( Default: "0.878,1,0.776,1" )

( Example: RGB_Alpha_Green_Zone="0.878,1,0.776,1" )

RGB_Alpha_White_Zone [string RGB_Alpha] - RGB_Alpha for the background color for the White Zone

* Optional ( Default: "1,1,1,1" )

( Example: RGB_Alpha_White_Zone="1,1,1,1" )

To_Front_After_Creation_And_Retrieve_01 ( string ) - It is used to specify what you want to move to to front after the

- list has been fully displayed.

To_Front_After_Creation_And_Retrieve_02 ... to _05 ( string ) - You have up to 5 to specify objects to front.

[ In those options you can use _Close_Form() before to move to another activity. ]

No_Network_Message_SP [ string ] - Message to display in case of network problems.

No_Network_Message_EN [ string ] - Message to display in case of network problems.

Example:

_Chat_Settings

{ Name="Medical" } { Url="http://sdg.muents.com" } { Messages_Table_Name="Chat_Messages" } { Messages_Chat_Group_Field_Name="chat_id" } { Messages_Chat_PostDate_Field_Name="post_yyyymmddhhmmss" } { Messages_Chat_Text_Message_Field_Name="Description" } { Messages_Chat_Source_Id_Field_Name="Source_id" } { Messages_Chat_Image_Width_Field_Name="Width" } { Messages_Chat_Image_Height_Field_Name="Height" } { Messages_Chat_Audio_Length_Field_Name="Audio_Length" }

{ Bottom_Margin=100 } { Custom_FontName="GeosansLight.ttf" }

{ Chat_Group_Id_Key_Variable=Chat_Group_Id } { Chat_User_Id_Key_Variable=Chat_User_Id }

{ Encryption_Key1_Variable=Enc1 } { Encryption_Key2_Variable=Enc2 }

{ Background=$R_Fondo.png } { Play_Audio_Icon=$R_play_audio_icon.png } { Downloading_Audio_Icon=$R_audio_wait.png } { Close_Zoom_Icon=$R_close_icon.png } { Spike_Green_Icon=$R_spike_green.png } { Spike_White_Icon=$R_spike_white.png } { Send_Message_Icon=$R_send_icon.png } { Attach_Image_Icon=$R_attach_image.png } { Record_Audio_Icon=$R_record_icon.png } { New_Incomming_Data_SoundFile=$R_beep.mp3 }

{ Translation_Icon=$R_Translate.png } { Take_Photo_Icon=$R_Photo_Camera.png } { Photo_Gallery_Icon=$R_Photo_Gallery.png }

{ Spinner_Image=loading-icon-png-26.png,240,427,150,150,20,200 } { To_Front_After_Creation_And_Retrieve_01="img_chat_header" } { To_Front_After_Creation_And_Retrieve_02="label_chat_title" } { To_Front_After_Creation_And_Retrieve_03="img_chat_back" } { To_Front_After_Creation_And_Retrieve_04="img_chat_close" }

_Chat_End


Chat_Show



Standard_Settings()

Standard_Settings_for_Selections()

Restore_Settings()

Cancel_Update_Form()

Close_Form()

Close_Select()

Backup_Settings()