PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Looper, List Box, Combo Box and Table control
  • Chart control
  • Using the ..Empty property on a report
  • Empty property used in the arrays and associative arrays
  • Limits
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
..Empty is used to find out whether:
  • a Looper, Table, List Box or Combo Box control is empty. The control can be a browsing control or a memory control.
  • a Chart control contains no series.
  • a report control is empty (control linked to an item).
  • an array (or an associative array) contains no element.
  • an element of an associative array exists or not.
  • a queue, a list or a stack contains no element.
For a report, ..Empty is used to find out whether the value of the item linked to a control, for the record being printed, is specified or not.
Versions 16 and later
Universal Windows 10 App This property is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This property is now available for the Windows Phone applications.
Universal Windows 10 App This property is now available for the Windows Phone applications.
Versions 15 and later
Android This property is now available for the Android applications.
New in version 15
Android This property is now available for the Android applications.
Android This property is now available for the Android applications.
Versions 17 and later
iPhone/iPad This property is now available for the iPhone/iPad applications.
WEBDEV - Browser code This property is now available in browser code.
WEBDEV - Browser code In browser code, this property can only be used on the associative arrays.
New in version 17
iPhone/iPad This property is now available for the iPhone/iPad applications.
WEBDEV - Browser code This property is now available in browser code.
WEBDEV - Browser code In browser code, this property can only be used on the associative arrays.
iPhone/iPad This property is now available for the iPhone/iPad applications.
WEBDEV - Browser code This property is now available in browser code.
WEBDEV - Browser code In browser code, this property can only be used on the associative arrays.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the reports in the iPhone/iPad applications.
New in version 18
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the reports in the iPhone/iPad applications.
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the reports in the iPhone/iPad applications.
Versions 20 and later
AndroidiPhone/iPad This property is now available for the Table controls in the Android applications and in the iPhone/iPad applications.
New in version 20
AndroidiPhone/iPad This property is now available for the Table controls in the Android applications and in the iPhone/iPad applications.
AndroidiPhone/iPad This property is now available for the Table controls in the Android applications and in the iPhone/iPad applications.
Versions 21 and later
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
AndroidAndroid Widget Java This property is now available for the stacks, the lists and the queues.
New in version 21
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
AndroidAndroid Widget Java This property is now available for the stacks, the lists and the queues.
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
AndroidAndroid Widget Java This property is now available for the stacks, the lists and the queues.
Versions 23 and later
WEBDEV - Browser code This property is now available in browser code.
New in version 23
WEBDEV - Browser code This property is now available in browser code.
WEBDEV - Browser code This property is now available in browser code.
Example
// This control becomes visible
// if the value of the item linked to the "EDT_Phone" control
// is not specified for the current record
IF EDT_Phone..Empty = False THEN
        EDT_Phone..Visible = False
END
// If the "TABLE_CustomerTable" control is empty,
// add a new row into this control
IF TABLE_CustomerTable..Empty = True THEN
TableAddLine(TABLE_CustomerTable, "Davis", "Peter")
END
Syntax
<Result> = <Element Name>..Empty
<Result>: Boolean
  • True if the specified element is empty,
  • False otherwise.
<Element Name>: Character string (with or without quotes)
Name of element to use.
Remarks

Looper, List Box, Combo Box and Table control

..Empty is used to find out whether the control is empty (..Empty returns True) or not.
This property applies to the Table, TreeView Table, List Box, ListView, Combo Box and Looper controls (see Limits).
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadWindows MobileUniversal Windows 10 AppPHPAjaxUser code (UMC)

Chart control

..Empty is used to find out whether the Chart control contains no series (..Empty returns True).
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadWindows MobileUniversal Windows 10 App

Using the ..Empty property on a report

For a report, ..Empty is used to find out whether the value of the item linked to a control, for the record being printed, is specified or not.
Note: If the value of the item linked to the specified control (for the record currently printed) corresponds to an empty string (""), this value is not considered as being empty.

Empty property used in the arrays and associative arrays

..Empty is used to find out:
  • Whether an array or an associative array is empty (..Empty returns True).
    Example:
    // Associative array of file sizes
    aaFileSize is associative array of int
    ...
    IF aaFileSize..Empty = False THEN
            Info("The array contains at least one element")
    END
  • Whether an element of an associative array exists or not. For an associative array without duplicate, ..Empty is set to False if the element exists. For an associative array with duplicates, ..Empty is set to False if at least one element exists.
    Example:
    // Associative array of integers
    // indexed on strings and with duplicates
    aaIDPerCustomer is associative array of int
    // Add the identifier of customer "A"
    aaIDPerCustomer["A"] = 55
    // Add the identifier of customer "B"
    aaIDPerCustomer["B"] = 321

    IF aaIDPerCustomer["A"]..Empty = False THEN
    Info("At least one element A exists")
    END

Limits

WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadWindows MobileUniversal Windows 10 App In the code of reports, ..Empty cannot be used on:
  • a report,
  • a report block,
  • a Check Box control,
  • a Shape control,
  • an Internal Report control,
  • a RTF control.
  • a Chart control.
..Empty can only be used on the controls linked to an item (calculated control, bar code, ...).
WINDEVWINDEV Mobile ..Empty only applies to the:
  • Table (and TreeView Table) controls,
  • List Box (and ListView) controls,
  • Combo Box controls,
  • Looper controls,
  • Chart controls,
  • Array and Associative Array variables.
  • Queue, List or Stack variables.
WEBDEV - Server code ..Empty only applies to the:
  • Table controls,
  • Versions 18 and later
    TreeView Table controls,
    New in version 18
    TreeView Table controls,
    TreeView Table controls,
  • List Box controls,
  • Combo Box controls,
  • Looper controls,
  • Chart controls,
  • Array and Associative Array variables,
  • Queue, List or Stack variables.
WEBDEV - Browser code ..Empty only applies to the:
  • Table controls,
  • TreeView Table controls,
  • List Box controls,
  • Combo Box controls,
  • Looper controls,
  • Array and Associative Array variables.
Java ..Empty only applies to the following elements:
  • List Box controls,
  • Combo Box controls,
  • Table controls,
  • Array and Associative Array variables,
  • Versions 21 and later
    Queue, List or Stack variables.
    New in version 21
    Queue, List or Stack variables.
    Queue, List or Stack variables.
Minimum required version
  • Version 9
This page is also available for…
Comments
Exemplo Empty
// Exemplo Empty

IF COMBO_NoName1..Empty THEN
EDT_Text1="COMBO_NoName1 Vazio"+CR
ELSE
EDT_Text1="COMBO_NoName1 Tem Dados"+CR

END
IF COMBO_NoName2..Empty THEN
EDT_Text1+="COMBO_NoName2 Vazio"+CR
ELSE
EDT_Text1+="COMBO_NoName2 Tem Dados"+CR

END
IF TABLE_Bancos..Empty THEN
EDT_Text1+="TABLE_Bancos Vazio"+CR
ELSE
EDT_Text1+="TABLE_Bancos Tem Dados"+CR
END
IF TABLE_NoName1..Empty THEN
EDT_Text1+="TABLE_NoName1 Vazio"+CR
ELSE
EDT_Text1+="TABLE_NoName1 Tem Dados"+CR
END

// Blog com Video e Exemplo

http://windevdesenvolvimento.blogspot.com.br/2016/11/aula982-dicas-009-empty.html

https://www.youtube.com/watch?v=dJzHDZ2-hD8

De matos
Dec. 04 2016