PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
New WINDEV, WEBDEV, WINDEV Mobile 24 feature!
  • 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
<gglConnection variable>.ListDocument (Function)
In french: <Variable gglConnexion>.ListeDocument
Retrieves the list of documents available on the Google server for the current user.
Example
// Connection
Cnt is gglConnection
...
IF Cnt.Connect =False THEN
Error(ErrorInfo())
END
...

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

// List the documents containing the "Test" text
arrDocuments = Cnt.ListDocument("fullText contains 'Test'")

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

// Display the title of each listed document
Doc is gglDocument dynamic
FOR EACH Doc OF arrDocuments
 Trace(Doc..Title)
END
Syntax

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

<Result> = <Google connection>.ListDocument([<Filter> [, <Folder> [, <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 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)
<Folder>: 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)
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.
Component : wd240ggl.dll
Minimum required version
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment