Supported functions

Array Functions

Table 186. Functions

Support Level

Feature Name

Coding Examples

Supported

LowerBound

Int b[-5 to 2,5],a[5],c[]

li_lower=LowerBound(b,2)

li_lower=LowerBound(b,1)

li_lower=LowerBound(a)

li_lower=LowerBound(a,1)

li_lower=LowerBound(c)

Supported

UpperBound

Int b[-15 to -5,5],a[5],c[]

li_upper=UpperBound(b,2)

li_upper=UpperBound(b,1)

li_upper=UpperBound(a)

li_upper=UpperBound(a,1)

li_upper=UpperBound(c)


Blob Functions

Table 187. Functions

Support Level

Feature Name

Coding Examples

Supported

Blob

blob lb_data = blob("convert string to blob")

string ls_data

lb_data = blob(ls_data)

Supported

BlobEdit

ulong ll_var

blob lb_data

ll_var = BlobEdit(lb_data, 1, "String")

ll_var = BlobEdit(lb_data, 3, 12345)

ll_var = BlobEdit(lb_data, 9, 2004-12-03)

ll_var = BlobEdit(lb_data, 1, blob("blob"))

Note: The data argument cannot be Any data type.

Supported

BlobMid

blob lb_data,lb_subdata

lb_subdata = BlobMid(lb_data,3)

lb_subdata = BlobMid(lb_data,5)

Supported

Len

long ll_len

blob lb_data,lb_subdata

ll_len = len(lb_data)

ll_len = len(lb_subdata)

Supported

LenW

long ll_len

blob lb_data,lb_subdata

ll_len = LenW(lb_data)

ll_len = LenW(lb_subdata)

Supported

String

blob lb_data,lb_subdata

string ls_data

ls_data = string(lb_data)

ls_data = string(lb_subdata)


Byte Functions

Table 188. Functions

Support Level

Feature Name

Coding Examples

Supported

Byte

 

Supported

GetByte

 

Supported

GetByteArray

 

Supported

SetByte

 


Data Type Checking and Conversion

Table 189. Functions

Support Level

Feature Name

Coding Examples

Supported

Asc

li_test = Asc ('adfsd')

li_test = Asc ('~nern')

li_test = Asc (ls_test)

li_test = Asc (wf_getstring())

//wf_getstring() is a function that has a string return value

Supported

Char

ls_test1 = Char(65)

ls_test1 = Char("~n~~djfksdl")

Supported

Date

ld_test = Date (ldt_test)

//ldt-test is a datetime variable

ld_test = Date (now())

ld_test = Date (ls_test)

//ls_test is a string variable

ld_test = Date (2003, 4, 1)

Note: if the argument contains an invalid date, Date returns NULL in PowerBuilder, whereas in the mobile application, it returns an empty string ("").

Supported

DateTime

ldt_test = Datetime (ld_test)

ldt_test = Datetime (ld_test, lt_test)

Note: After conversion, the microsecond portion in the time argument will be omitted.

Supported

Dec

ldec_test = Dec ("1.234567")

//Return the string as a decimal

ldec_test = Dec ("1234567")

ldec_test = Dec (dw_1.object.data[1,2])

Supported

Double

ldb_test = Double ("78.7956")

//Return the string as a double

Supported

Integer

li_test = Integer ("93")

//Return the string as an integer

Supported

IsDate

If IsDate ("Jan 32, 1993") = TRUE Then...

//Determines whether the string is a valid date

This function will validate whether the string is a date according to the regional settings of the client. For example, if the regional setting is set to United States, IsDate ("m-d-yyyy") returns True, while IsDate ("dd-mm-yyyy") and IsDate ("yyyy-mm-dd") return False; when set to United Kingdoms, IsDate ("d-m-yyyy") returns True, while IsDate ("m-d-yyyy") and IsDate ("yyyy-mm-dd") return False; when set to China, Korea, etc., IsDate ("yyyy-mm-dd") returns True, and the other formats return False.

Supported

IsNull

Integer a, b...

lb_value = isnull (a+b)

//If the value of expression a+b is null, the lb_value is set as True; otherwise, False

Supported

IsNumber

If IsNumber ("23.45") Then ...

//Return True since the value of the string is a number

Note: PowerBuilder does not support 1E123 (more than two digits after E). Functions such as IsNumber ("1E123") in PowerBuilder return FALSE, but after conversion, IsNumber returns TRUE.

Supported

IsTime

IsTime (timevalue)

If IsTime ("23: 11") Then ...

//hh:mmIf

IsTime ("23: 11:33") Then ...

//hh:mm:ssIf

IsTime ("23: 11:33.123456") Then ...

//hh:mm:ss.xxxxxx

Supported

Long

ll_test = long ("99.88")

//Return the string as a long

ll_test = long (16119,26930)

//Convert the two UnsignedIntegers into a long

Unsupported

LongLong

 

Supported

Real

lr_test = Real ("88.56")

//Return the string as a real

Supported

String

String (data {,format})

ls_test = string (1993-05-17, "mm/dd/yyyy") //Convert a date to string
ls_test = string (07:12:28, "hh:mm:ss") //Convert a time to string
ls_test = string (44.56, "$#,##0.00") //Convert a numeric to string
ls_test = string ("gf", "@*@") //Convert a string to formatted string

Notes:

String (data, format) cannot be used in DataWindow property expression.

The format argument cannot be [currency].

Supported

Time

lt_test = time ("23:00")

Note: After conversion, the microsecond portion of the time will be omitted.


Date, Day, and Time Functions

Table 190. Functions

Support Level

Feature Name

Coding Examples

Supported

Day

li_test = Day(2003-04-01)

li_test = Day(ld_today)

li_test = Day(today())

Supported

DayName

ls_test = DayName(2003-04-01)

ls_test = DayName(ld_today)

ls_test = DayName(today())

Supported

DayNumber

li_test = DayNumber(2003-04-01)

li_test = DayNumber (ld_today)

li_test = DayNumber (today())

Supported

DaysAfter

ll_test = DaysAfter(2003-04-01, 2003-04-01)

ll_test = DaysAfter(ld_test1, today())

Supported

Hour

Hour(time)

li_test = Hour(21:00:00)

li_test = Hour(lt_test)

li_test = Hour(Now())

Supported

Minute

li_test = Minute (21:00:00)

li_test = Minute (lt_test)

li_test = Minute (Now())

Supported

Month

li_test = Month (2003-04-01)

li_test = Month (ld_today)

li_test = Month (today())

Supported

Now

ldt_test = Now()

Supported

RelativeDate

ld_test = RelativeDate (2003-04-01, 27)

ld_test = RelativeDate (ld_test1, li_after)

ld_test = RelativeDate (today(), li_after)

Supported

RelativeTime

ld_test = RelativeDate (2003-04-01, 27)

ld_test = RelativeDate (ld_test1, li_after)

ld_test = RelativeDate (today(), li_after)

Supported

Second

li_test = Second (21:00:00)

li_test = Second (lt_test)

li_test = Second (Now())

Supported

SecondsAfter

ll_test = SecondsAfter (21:00:00, 09:00:00)

ll_test = SecondsAfter (lt_test1, now())

Supported

Today

ld_test = Today()

Supported

Year

li_test = Year (2003-04-01)

li_test = Year (ld_today)

li_test = Year (today())


DDE Client Functions & Events

Table 191. Functions

Support Level

Feature Name

Coding Examples

Supported

CloseChannel

CloseChannel(handle, Handle(w_sheet))

Supported

ExecRemote

 

Supported

GetDataDDE

string Str20

GetDataDDE(Str20)

Supported

GetDataDDEOrigin

string WhichAppl, WhatTopic, WhatLoc

GetDataDDEOrigin(WhichAppl, WhatTopic, WhatLoc)

Supported

GetRemote

 

Unsupported

HotLinkAlarm

 

Supported

OpenChannel

long handle

handle = OpenChannel("Excel", "REGION.XLS")

Note: It is recommended to determine whether the execution succeeds by its returning -1, -9 or a positive integer. Do not assume that it has failed because it returns a negative integer.

Supported

RespondRemote

IF GetDataDDE(Value) = 1 THEN

RespondRemote(TRUE)

Supported

SetRemote

 

Supported

StartHotLink

StartHotLink("Any", "MyPBApp", "Any")

Supported

StopHotLink

StopHotLink("Any", "MyPBApp", "Any")


File Functions

Table 192. File Functions

Support Level

Feature Name

Coding Examples

Unsupported

ChangeDirectory

The file directory in iOS and Android is different from that of Windows, therefore, the directory functions such as ChangeDirectory, CreateDirectory, DirectoryExists, RemoveDirectory etc. are unsupported.

Unsupported

CreateDirectory

 

Unsupported

DirectoryExists

 

Supported

FileClose

 

Supported

FileCopy

In the iOS and Android system, only files under the same directory (the sub-folder of the application sandbox) can be copied or renamed. Reason is in the iOS and Android system, we have full read/write rights to the sandbox of our application, but not to the others.

Supported

FileDelete

 

Unsupported

FileEncoding

 

Supported

FileExist

 

Supported

FileLength

 

Unsupported

FileLength64

 

Unsupported

FileMove

 

Supported

FileOpen

 

Supported

FileRead

 

Supported

FileReadEx

 

Supported

FileSeek

 

Unsupported

FileSeek64

 

Supported

FileWrite

 

Supported

FileWriteEX

 

Unsupported

GetCurrentDirectory

 

Unsupported

GetFileOpenName

 

Unsupported

GetFileSaveName

 

Unsupported

GetFolder

 

Unsupported

RemoveDirectory

 


International Functions

Table 193. Functions

Support Level

Feature Name

Coding Examples

Unsupported

FromAnsi

 

Unsupported

FromUnicode

 

Unsupported

IsAllArabic

 

Unsupported

IsAllHebrew

 

Unsupported

IsAnyArabic

 

Unsupported

IsAnyHebrew

 

Unsupported

IsArabic

 

Unsupported

IsArabicAndNumbers

 

Unsupported

IsHebrew

 

Unsupported

IsHebrewAndNumbers

 

Supported

Reverse

ls_return = Reverse(ls_test)

Unsupported

ToAnsi

 

Unsupported

ToUnicode

 


Miscellaneous Functions

Table 194. Functions

Support Level

Feature Name

Coding Examples

Supported

Beep

Beep(5)

Supported

ChooseColor

li_color = ChooseColor(red, custom [ ])

Supported

ClassName

ls_classname = ClassName(li_array)

Note: If the argument is a numeric data type, the function returns number.

Supported

DebugBreak

IF IsNull(auo_ext) THEN DebugBreak()

Supported

DraggedObject

DragObject poj_ctr

poj_ctr = DraggedObject()

Supported

GetFolder

integer li_result

li_result = GetFolder("my targets", ls_path)

Supported

IntHigh

li_high = IntHigh(ll_value)

Supported

IntLow

li_low = IntLow(ll_value)

Supported

IsValid

IF IsValid(w_emp) = FALSE THEN

Open(w_emp)

Supported

KeyDown

When the Done key of the virtual keyboard in iOS and Android is hit, the KeyDown and KeyUp events of the control with focus will be triggered, and the value of KeyCode parameter is keyenter.

On the Android-based device, the KeyDown event will not be triggered if predictive text input method is used.

Supported

MessageBox

li_return = MessageBox('Title1','Text1',Information!,OK!,1)

Supported

PixelsToUnits

li_return = PixelsToUnits(35, XPixelsToUnits!)

Unsupported

PopulateError

 

Supported

RGB

ll_color = RGB(255, 255, 255)

The RGB value scope supported: 0~16777215

The custom color scope supported: 16777216~33554431

Note: If the color value is -2 or -1 (Transparent), the color display effect will be different in the mobile application from in the PowerBuilder application. If it is a color unsupported (the color value is less than -2), the color will be replaced with ButtonFace color.

Supported

SetNull

SetNull(ls_test)

Partially Supported

SetPointer

SetPointer(HourGlass!)

Only HourGlass is supported. When set to HourGlass, the image displayed in iOS and Android is the activity indicator, which is different from PowerBuilder.

The activity indicator will also automatically appear every time when the client calls the server, you can set to empty string SetPointer("") to not display the activity indicator, and set to a non-empty string (for example, SetPointer("true")) to display the activity indicator again.

Unsupported

SignalError

 

Supported

Sleep

Sleep (5)

Supported

UnitsToPixels

li_return = UnitsToPixels(350, YUnitsToPixels!)


Numeric Functions

Table 195. Functions

Support Level

Feature Name

Coding Examples

Supported

Abs

ldec_return = Abs(-15725.12)

ldec_return = Abs(ai_num)

Supported

ACos

ldb_ return = ACos(.84147)

ldb_ return = ACos(af_num)

Supported

ASin

ldb_ return = ASin(.84147)

ldb_ return = ASin(af_num)

Supported

ATan

ldb_ return =Atan(.84147)

ldb_ return = ATan(af_num)

Supported

Ceiling

li_ return = Ceiling(3558.5)

li_ return = Ceiling(af_num)

Supported

Cos

ldb_ return = Cos(10586.3)

ldb_ return = Cos(af_num)

Supported

Exp

ldb_ return = Exp(17438.15)

ldb_ return = Exp(af_num)

Supported

Fact

ldb_ return = Fact(14)

ldb_ return = Fact(af_num)

Supported

Int

li_ return = Int(8314.11)

li_ return = Int(af_num)

Supported

Log

ldb_ return = Log(7628)

ldb_ return = Log(af_num)

Supported

LogTen

ldb_ return = LogTen(30975.5)

ldb_ return = LogTen(af_num)

Supported

Max

ldb_ return = LogTen(30975.5)

ldb_ return = LogTen(af_num)

Supported

Min

ldec_ return = Min(1019,21120)

ldec_ return = Min(af_num,bf_num)

Supported

Mod

ldec_ return = Mod(32526,8261.15)

ldec_ return = Mod(af_num,bf_num)

Supported

Pi

ldb_ return = Pi(20852)

ldb_ return = Pi(af_num)

Supported

Rand

ldec_ return = Rand(14888)

ldec_ return = Rand(af_num)

Supported

Randomize

Randomize(0)

Supported

Round

ldec_ return = Round(6655.16973,3)

ldec_ return = Round(af_num,b_num)

Executing Round in SQL statements, decimals will be ignored on mobile.

Supported

Sign

li_ return = Sign(0)

li_ return = Sign(-543534)

li_ return = Sign(4563)

li_ return = Sign(af_num)

Supported

Sin

ldb_ return = Sin(-751)

ldb_ return = Sin(751)

ldb_ return = Sin(af_num)

Supported

Sqrt

ldb_ return = Sqrt(740752012)

ldb_ return = Sqrt(af_num)

Supported

Tan

ldb_ return = Tan(28713.4)

ldb_ return = Tan(af_num)

Supported

Truncate

ldec_ return = Truncate(21133.24473,3)

ldeci_ return = Truncate(af_num)


Print Functions

Not all of the Print functions are supported on iOS and Android. See the following table for details.

Note: The maximum number of pages that can be printed in iOS and Android is set to 45, due to the limited available memory of the mobile devices. Therefore, pages that go over 45 will not be printed; only the first 45 pages will be printed.

Table 196. Print Functions

Support Level

Feature Name

Coding Examples

Partially Supported

Print

Only the following syntax is supported in iOS and Android:

Print (printjobnumber, {tab1, } string {, tab2})

Supported

PrintBitMap

 

Unsupported

PrintCancel

In iOS and Android, the user can only manually cancel the print job in the mobile printer center.

Supported

PrintClose

 

Supported

PrintDataWindow

 

Supported

PrintDefineFont

Only the OS-supported fonts can be used. If other fonts are used, the OS default font will be used, for example, Helvetica is the default font in iOS.

Unsupported

PrintGetPrinter

iOS or Android does the printing through a WI-FI printer called AirPrint, and no printer driver needs to be installed at the client.

Unsupported

PrintGetPrinters

 

Supported

PrintLine

 

Supported

PrintOpen

 

Supported

PrintOval

 

Unsupported

PrintPage

In iOS and Android, the user can manually select a single page or a range of pages to print in the Printer Options window.

Supported

PrintRect

 

Supported

PrintRoundRect

 

Supported

PrintScreen

PrintScreen prints the current window including any visual part in it, but excludes the other visual elements outside of the application such as the OS system status bar. The user can also manually capture a screenshot of the entire screen by pressing the buttons of the device, for example, press the Home button and the On/Off button of the iOS device at the same time.

Unsupported

PrintSend

 

Supported

PrintSetFont

 

Unsupported

PrintSetPrinter

 

Unsupported

PrintSetSpacing

iOS font and Android font do not support this setting.

Unsupported

PrintSetup

 

Unsupported

PrintSetupPrinter

 

Supported

PrintText

 

Supported

PrintWidth

 

Supported

PrintX

 

Supported

PrintY

 


String Functions

Table 197. Functions (for PB9)

Support Level

Feature Name

Coding Examples

Supported

Asc

li_test = Asc('adfsd')

li_test = Asc('~nern')

li_test = Asc(ls_test)

li_test = Asc(wf_getstring())

Supported

Char

ls_test1 = Char(65)

ls_test1 = Char("~n~~djfksdl")

Supported

Fill

ls_fill = Fill('-+',10)

ls_fill = Fill('hello', 6)

Supported

FillW

ls_fill = FillW('-+',10)

ls_fill = FillW('hello', 6)

Supported

LastPos

ll_return = LastPos('Appeon Appeon', 'Ap')

ll_return = LastPos('Appeon Appeon', 'Ap',4)

Supported

Left

ls_return = string(Left('z{uDPk7#k',9))

Supported

LeftTrim

ls_return = string(LeftTrim(' fdfsdf'))

ls_return = string(LeftTrim(' 34ttrtertgre'))

The second argument is unsupported, for example, the following script is unsupported:

ls_return = string(LeftTrim(' fdfsdf', true))

ls_return = string(LeftTrim(' 34ttrtertgre', true))

Supported

LeftTrimW

ls_return = string(LeftTrimW(' fdfsdf'))

ls_return = string(LeftTrimW(' 34ttrtertgre'))

Supported

LeftW

ls_return = string(LeftW('z{uDPk7#k',9))

Supported

Len

ls_return = string(Len('gfgdfgsdrgdfg'))

Supported

LenW

ls_return = string(LenW('gfgdfgsdrgdfg'))

Supported

Lower

ls_return = Lower(“You ARE Welcome!”)

Supported

Match

ls_return = string(Match('ABBBC,ABB*C'))

Supported

MatchW

ls_return = string(MatchW('ABBBC,ABB*C'))

Supported

Mid

ls_return = string(Mid('Appeon Appeon',5,2))

Supported

MidW

ls_return = string(MidW('Appeon Appeon',5,2))

Supported

Pos

ls_return = string(Pos('Appeon Appeon','on'))

ls_return = string(Pos('Appeon Appeon','peon',2))

Supported

PosW

ls_return = string(PosW('Appeon Appeon','on'))

ls_return = string(PosW('Appeon Appeon','peon',2))

Supported

Replace

ls_return = string(Replace('BABE RUTH', 1, 4, 'BABY'))

Supported

ReplaceW

ls_return = string(ReplaceW('BABE RUTH', 1, 4, 'BABY'))

Supported

Reverse

ls_return = string(Reverse('vDl%Qv'))

Supported

Right

ls_return = string(Right('Davis', 4))

Supported

RightTrim

ls_return = string(RightTrim('fsdjd '))

ls_return = string(RightTrim('fsdfjdlfsd '))

The second argument is unsupported, for example, the following script is unsupported:

ls_return = string(RightTrim('fsdjd ', true))

ls_return = string(RightTrim('fsdfjdlfsd ', true))

Supported

RightTrimW

ls_return = string(RightTrimW('fsdjd '))

ls_return = string(RightTrimW('fsdfjdlfsd '))

Supported

RightW

ls_return = string(RightW('Davis', 4))

Supported

Space

ls_return = string(Space(14))

Supported

Trim

ls_return = string(Trim(' uifusd '))

The second argument is unsupported, for example, the following script is unsupported:

ls_return = string(Trim(' uifusd ', true))

Supported

TrimW

ls_return = string(TrimW(' uifusd '))

Supported

Upper

ls_return = string(Upper('how do you do?'))

Supported

WordCap

ls_return = string(WordCap('how do you do?'))


Table 198. Functions (for PB 10 or above)

Support Level

Feature Name

Coding Examples

Supported

Asc

li_test = Asc('~nern')

li_test = Asc(wf_getstring())

Supported

AscA

li_test = AscA('adfsd')

li_test = AscA(ls_test)

Note: The function returns different value on mobile from that in PowerBuilder if the character encoding is non-SJIS.

Supported

Char

ls_test = Char(65)

ls_test = Char("~n~~djfksdl")

Supported

CharA

ls_test = CharA(65)

ls_test = CharA("~n~~djfksdl")

Note: The function returns different value on mobile from that in PowerBuilder if the character encoding is non-SJIS.

Supported

Fill

ls_fill = Fill('-+',10)

ls_fill = Fill('hello', 6)

Supported

FillA

ls_fill = FillA('-+',10)

ls_fill = FillA('hello', 6)

Note: The function returns different value on mobile from that in PowerBuilder if the character encoding is non-SJIS.

Supported

FillW

ls_fill = FillW('-+',10)

ls_fill = FillW('hello', 6)

Supported

LastPos

ll_return = LastPos('Appeon Appeon', 'Ap')

ll_return = LastPos('Appeon Appeon', 'Ap',4

Supported

Left

ls_return = string(Left('z{uDPk7#k',9))

Supported

LeftA

ls_return = string(LeftA('z{uDPk7#k',9))

Note: The function returns different value on mobile from that in PowerBuilder if the character encoding is non-SJIS.

Supported

LeftTrim

ls_return = string(LeftTrim(' fdfsdf'))

ls_return = string(LeftTrim(' 34ttrtertgre'))

Supported

LeftTrimW

ls_return = string(LeftTrimW(' fdfsdf'))

ls_return = string(LeftTrimW(' 34ttrtertgre'))

Supported

LeftW

ls_return = string(LeftW('z{uDPk7#k',9))

Supported

Len

ls_return = string(Len('gfgdfgsdrgdfg'))

Supported

LenA

ls_return = string(LenA('gfgdfgsdrgdfg'))

Note: The function returns different value on mobile from that in PowerBuilder if the character encoding is non-SJIS.

Supported

LenW

ls_return = string(LenW('gfgdfgsdrgdfg'))

Supported

Lower

ls_return = Lower(“You ARE Welcome!”)

Supported

Match

ls_return = string(Match('ABBBC,ABB*C'))

Supported

MatchW

ls_return = string(MatchW('ABBBC,ABB*C'))

Supported

Mid

ls_return = string(Mid('Appeon Appeon',5,2))

Supported

MidA

ls_return = string(MidA('Appeon Appeon',5,2))

Note: The function returns different value on mobile from that in PowerBuilder if the character encoding is non-SJIS.

Supported

MidW

ls_return = string(MidW('Appeon Appeon',5,2))

Supported

Pos

ls_return = string(Pos('Appeon Appeon','on'))

ls_return = string(Pos('Appeon Appeon','peon',2))

Supported

PosA

ls_return = string(PosA('Appeon Appeon','on'))

ls_return = string(PosA('Appeon Appeon','peon',2))

Note: The function returns different value on mobile from that in PowerBuilder if the character encoding is non-SJIS.

Supported

PosW

ls_return = string(PosW('Appeon Appeon','on'))

ls_return = string(PosW('Appeon Appeon','peon',2))

Supported

Replace

ls_return = string(Replace('BABE RUTH', 1, 4, 'BABY'))

Supported

ReplaceA

ls_return = string(ReplaceA('BABE RUTH', 1, 4, 'BABY'))

Note: The function returns different value on mobile from that in PowerBuilder if the character encoding is non-SJIS.

Supported

ReplaceW

ls_return = string(ReplaceW('BABE RUTH', 1, 4, 'BABY'))

Supported

Reverse

ls_return = string(Reverse('vDl%Qv'))

Supported

Right

ls_return = string(Right('Davis', 4))

Supported

RightA

ls_return = string(RightA('Davis', 4))

Note: The function returns different value on mobile from that in PowerBuilder if the character encoding is non-SJIS.

Supported

RightTrim

ls_return = string(RightTrim('fsdjd'))

ls_return = string(RightTrim('fsdfjdlfsd'))

Supported

RightTrimW

ls_return = string(RightTrimW('fsdjd'))

ls_return = string(RightTrimW('fsdfjdlfsd'))

Supported

RightW

ls_return = string(RightW('Davis', 4))

Supported

Space

ls_return = string(Space(14))

Supported

Trim

ls_return = string(Trim('uifusd'))

Supported

TrimW

ls_return = string(TrimW('uifusd'))

Supported

Upper

ls_return = string(Upper('how do you do?'))

Supported

WordCap

ls_return = string(WordCap('how do you do?'))


System & Environment Functions

Table 199. Functions

Support Level

Feature Name

Coding Examples

Unsupported

Clipboard

 

Supported

CommandParm

String ls_command_line

ls_command_line = CommandParm()

Supported

GetApplication

application app

app = GetApplication()

Supported

GetEnvironment

environment env

integer rtn

rtn = GetEnvironment(env)

Supported

GetFocus

Lobj_control = GetFocus()

Supported

Handle

Note: the Handle property is partially supported

Supported syntax: Handle (objectname)

Unsupported syntax: Handle (objectname, previous)

Supported

Post

Post(Handle(w_date), 277, 3, 0)

Note: the message# argument cannot be a user defined message number.

Supported

ProfileInt

ProfileInt ("C:\PROFILE.INI", "PB", "maximized", 3)

Supported

ProfileString

ProfileString ("C:\PROFILE.INI", "Employee","Name", "None")

Unsupported

Restart

 

Supported

Run

This function is supported in Android only, and unsupported in iOS.

Run ( string {, windowstate } )

The string parameter can only be the full path of the file name; it cannot be a program name, or a file name without a path. The windowstate parameter is unsupported; the program window will be maximized by default when run in Android.

Supported syntax:

Run ("/storage/emulated/0/android/data/com.appone.mobile/files/626342311/plugin/test.pdf")

This will give control to Android, and Android will decide whether to prompt the user to select a program to open the PDF file (if there is more than one PDF viewer program installed on it), or directly open the PDF file if only one PDF viewer program is detected or a default PDF viewer program is set before. Then the Appeon mobile app will be switched to run in the background, and the PDF viewer program will be running at the foreground.

Unsupported syntax: Run ("Clock", Minimized!)

Supported

Send

Send(Handle(w_emp), 277, 2, 0)

Note: the message# argument cannot be a user defined message number.

In PowerServer Mobile, the Assistive Touch Bar (containing Left-Click, Right-Click, and Drag modes) is introduced which will cause some differences in message handling. In the Left-Click mode, LButtonDown will not be handled immediately until PowerServer Mobile detects that the current mode is not the Drag mode. If at the same time the user performs a Click operation (LButtonDown is triggered first, then LButtonUp), LButtonDown and LButtonUp will be handled simultaneously when LButtonUp is triggered.

Supported

SetProfileString

SetProfileString("C:\PROFILE.INI", "Position", "Title", "MGR")

Unsupported

SignalError

 

Supported

Yield

Yield()

To update the UI in a loop, in iOS and Android the UI will not be updated until the Yield function is called, while on Windows and PowerBuilder, the UI will be updated even if no Yield function is called.

Note: When the Yield function is called in more than one function or event, try to avoid executing re-entry code. If the reentry code is processing a long task and it is not completed when it is executed again in another place, serious problems may occur.

For example, the script of the cb_1.click event is as follows:

for i = 1 to 1000
     yield()
     dw_1.retrieve()
next

When clicking the command button twice, if dw_1 retrieves a large amount of data, then there is a possibility that when the dw_1.retrieve() function for the first click is still being executed, it is executed again after the second click. This would cause system errors.


Timing Functions

Table 200. Functions

Support Level

Feature Name

Coding Examples

Supported

CPU

long ll_start

ll_start = Cpu()

Supported

Idle

Idle(300)

Unsupported

Start

 

Supported

Timer

Timer(10, w_main)

Note: In Android and iOS, MessageBox will block the execution of the Timer event.


Window Functions

Table 201. Functions

Support Level

Feature Name

Coding Examples

Supported

Close

close(w_commandbutton)

close(parent)

Supported

CloseWithReturn

CloseWithReturn(parent,"return value")

Notes:

  1. In PowerBuilder, the return value is Null when there are two Nulls in the parameter. In this case, the return value in JavaScript is not Null.

  2. On mobile, if the returnvalue parameter is NULL, the return value will be stored in the PowerObjectParm property of the Message object.

Supported

Open

Open(w_main, parent)

Supported

OpenSheet

OpenSheet(w_main,w_parent)

OpenSheet(lw_main , "w_main", w_frame , 2, Cascaded!)

Notes:

  1. When opening the same local window variables more than once within the same function, the result is unpredictable. Avoid using the OpenSheet window function in the following manner:

    w_11 ww
    opensheet (ww, "w_11", w_2, 2, Cascaded!)
    opensheet (ww, "w_11", w_2, 0, Cascaded!)
  2. The following syntax is supported:

    OpenSheet (sheetrefvar {, windowtype}, mdiframe {, position {, arrangeopen}})
  3. The ArrangeOpen argument can be Cascaded!, Layered!, Original!. If the argument is Cascaded!, the size of the sheet on mobile is different from that in PowerBuilder.

  4. In Windows 7, the upper part of the window (sheet) that is opened by using OpenSheet or OpenSheetWithParm may be overlapped by the MDI frame window. If this happens, you can work it around by using the Post function with OpenSheet or OpenSheetWithParm as shown below:

    post opensheet (w_main, w_mdi, ...)

Unsupported

OpenSheetAsDocument

 

Unsupported

OpenSheetDocked

 

Unsupported

OpenSheetInTabGroup

 

Supported

OpenSheetWithParm

String ls_str
OpenSheetWithParm (w_main, ls_str, w_parent)

Note: The window type in the function cannot be MDI or MDIHelp.

The following syntax is supported:

OpenSheetWithParm (sheetrefvar, parameter {, windowtype}, mdiframe {, position {, arrangeopen}})

Unsupported

OpenSheetWithParmAsDocument

 

Unsupported

OpenSheetWithParmDocked

 

Unsupported

OpenSheetWithParmInTabGroup

 

Supported

OpenWithParm

OpenWithParm (w_main, w_parent)

Notes:

  1. The window type in the function cannot be MDI or MDIHelp.

  2. On mobile, if the parameter argument is NULL, the argument will be stored in the PowerObjectParm property of the Message object.