PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Possible error cases:
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
GglListDocument (Function)
In French: GglListeDocument
Retrieves the list of documents available on the Google server for the current user.
Warning
From version 20 (51), the management of Google documents evolves.
Indeed, the management of Google documents in WLanguage was using the "Google Documents List" service. The "Google Documents List" service will no longer be accessible from April 2015.

From now on, only the "Drive" API can be used. Using this API in your applications requires:
  • the declaration of the application in the Google console,
  • the activation of "Drive" API in the Google console.
See the help about gglConnect ("Prerequisite for the OAuth 2.0 authentication" paragraph) for more details.
The WLanguage functions and types used to manage the Google documents evolve in order to manage the "Drive" API from version 200051.
Note: If you are using an earlier version of WINDEV, WEBDEV or WINDEV Mobile, the functions for managing the Google documents can no longer be used from April 2015.
Example
// Connection
Cnt is gglConnection
...
IF GglConnect(Cnt) = False THEN
Error(ErrorInfo())
END
...

// List of all documents
arrDocuments is array of 0 gglDocument dynamic
arrDocuments = GglListDocument(Cnt)

// Lists the documents containing the "Test" text
arrDocuments = GglListDocument(Cnt, "fullText contains 'Test'")

// List of favorite text documents found in the "Custom" folder
arrDocuments = GglListDocument(Cnt, gglWordProcessing, "Custom")

// Displays the title of each listed document
Doc is gglDocument dynamic
FOR EACH Doc OF arrDocuments
 Trace(Doc..Title)
END
Syntax
Versions 20 and later

Syntax that is using the Google Drive API (recommended) Hide the details

<Result> = GglListDocument(<Google Connection> , <Search to Perform>)
<Result>: Array of gglDocument variables
Array of gglDocument variables: each array element contains the characteristics of a document found on the Google server.
<Google Connection>: gglConnection variable
Name of gglConnection variable to use. This connection was validated by GglConnect.
<Search to Perform>: Character string (with quotes)
Search formula. See the documentation about the "Drive" API to find out the parameters that can be used: https://developers.google.com/drive/web/search-parameters
New in version 20

Syntax that is using the Google Drive API (recommended) Hide the details

<Result> = GglListDocument(<Google Connection> , <Search to Perform>)
<Result>: Array of gglDocument variables
Array of gglDocument variables: each array element contains the characteristics of a document found on the Google server.
<Google Connection>: gglConnection variable
Name of gglConnection variable to use. This connection was validated by GglConnect.
<Search to Perform>: Character string (with quotes)
Search formula. See the documentation about the "Drive" API to find out the parameters that can be used: https://developers.google.com/drive/web/search-parameters

Syntax that is using the Google Drive API (recommended) Hide the details

<Result> = GglListDocument(<Google Connection> , <Search to Perform>)
<Result>: Array of gglDocument variables
Array of gglDocument variables: each array element contains the characteristics of a document found on the Google server.
<Google Connection>: gglConnection variable
Name of gglConnection variable to use. This connection was validated by GglConnect.
<Search to Perform>: Character string (with quotes)
Search formula. See the documentation about the "Drive" API to find out the parameters that can be used: https://developers.google.com/drive/web/search-parameters

Syntax kept for backward compatibility, adapted to the "Drive" API Hide the details

<Result> = GglListDocument(<Google Connection> [, <Filter> [, <Documentation> [, <String to Find>]]])
<Result>: Array of gglDocument variables
Array of gglDocument variables: each array element contains the characteristics of a document found on the Google server.
<Google Connection>: gglConnection variable
Name of the gglConnection variable to use. This connection was validated by GglConnect.
Versions 20 and later
Caution: the properties of the gglConnection variable must be revised for the OAuth 2.0 authentication.
New in version 20
Caution: the properties of the gglConnection variable must be revised for the OAuth 2.0 authentication.
Caution: the properties of the gglConnection variable must be revised for the OAuth 2.0 authentication.
<Filter>: Optional Integer constant
Indicates the type of document to list:
gglWorksheetLists the "Worksheets" files only (files with a csv, xls or ods extension).
gglPresentationLists the "Presentation" files only (files with a ppt or pps extension).
gglStarredConstant that can be combined with the other choices. Used to retrieve the documents tagged as "starred".
gglAll
(Default value)
Lists all the documents found on the Google server in the specified folder.
gglWordProcessingLists the "Word processing" files only (files with a txt, rtf, doc, odt, sxw or html extension)
<Documentation>: Optional character string (with quotes)
Name of the folder containing the files to list. If this parameter is not specified, all the files found in all the folders are taken into account.
<String to Find>: Optional character string (with quotes)
Caution: From version 20, this parameter evolves with the implementation of the "Drive" API.
Search formula. See the documentation about the "Drive" API to find out the parameters that can be used: https://developers.google.com/drive/web/search-parameters
Remarks

Possible error cases:

  • The Internet connection is not valid.
  • The authentication was not performed properly.
  • Caution: you cannot perform a search that is using both:
    • a filter applied to a type of document,
    • a filter applied to the "Starred" documents,
    • a filter applied to a specific folder.
Related Examples:
Accessing the Google documents Unit examples (WINDEV): Accessing the Google documents
[ + ] Using the gglXxx functions to access the documents defined in your Google account.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230ggl.dll
Windows Mobile wp230ggl.dll
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment