PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Selection condition
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
Warning
From version 20, the SQL views and the materialized views are available.
The views handled by this function correspond to the former mechanism of views. They do not correspond to SQL views or to materialized views.
Runs a view that was created beforehand (can be used to refresh the view data for example). If the view was created by HCreateView associated with the hViewPostponed constani, HExecuteView must necessarily be used to run the view.
Reminder: a view corresponds to the image of a data file at a given time. A view is stored in memory, which insulates it from the modifications performed in the associated data file. A view can be handled like a standard HFSQL data file.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
// Runs the Customer34 view
HExecuteView(Customer34)
Syntax
<Result> = HExecuteView(<View Name> [, <Selection Condition>])
<Result>: Boolean
  • True if the view was run,
  • False otherwise. HError returns more details about the problem.
<View Name>: Character string (with or without quotes)
Name of view to run. This name was defined by HCreateView.
<Selection Condition>: Optional character string
  • New selection condition for the view records (<Selection Condition> replaces the condition specified when creating the view). This selection condition can be a character string in Ansi or Unicode format.
  • Empty string ("") to avoid modifying the selection condition.
Remarks

Selection condition

The general syntax of a condition has the following format:
"CustName>'Smith' and ZipCode=34 or ZipCode=32"
The supported operators depend on the type of items used in the condition:
<>DifferentValid for all types
>Greater thanValid for all types
>=Greater than or equal toValid for all types
<Less thanValid for all types
<=Less than or equal toValid for all types
=Strictly equal toValid for all types
~=Almost equal toValid for string types only
]ContainsValid for string types only
]=Starts withValid for string types only
Notes about the selection condition:
  • The constant strings must be enclosed in simple quotes.
  • If an item name is used in the selection condition, it must only contain letters, numbers and underscore characters ("_"). If the item name contains other characters (apostrophe, etc.), the name of the item must be enclosed in double quotes.
    For example: "email@"]'fr'
  • Comparisons between strings are performed according to the ASCII value of the characters and not according to the lexicographic value ('a' > 'Z').
  • The binary memos, the composite keys and the subscripted items cannot be part of a selection condition.
  • If a <string constant> contains a simple quote (or a double quote), this simple quote (or double quote) must be preceded by a backslash character ( \ ).
  • All the items of the main data file can be included in the condition (even the ones that are not items of the view).
  • The condition is applied to each virtual record before it is included in the view. Therefore, you cannot specify several mutually excluding conditions for the same record (join). For example:
    • "Date='1997' and Date='1996'" returns no result.
    • "Date>='1996' and Date<='1997'" returns all the records found between 1996 and 1997.
  • This selection condition can be a character string in Ansi or Unicode format.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Linux wd230hf.so
Windows Mobile wp230hf.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment