Docs
ServoyCloudSupportSamplesOpen SourceCommunity
  • Home
  • GUIDES
    • Platform Overview
    • Get Servoy
    • Get Started
      • Chapter 0
      • Chapter 1
      • Chapter 2
      • Chapter 3
      • Chapter 4
      • Chapter 5
    • Get Help
      • SuLA Instructions
      • SuLA Terms
    • Develop
      • Application Design
        • Forms
          • Layout Management
            • Simple Layout
            • Fully Responsive
              • Bootstrap 12-Grid
              • Flexbox
              • Custom Div
              • Collapsible Container
              • Simple Collapsible
              • Center Container
              • Inline Group Container
            • Abstract Form
          • Form Containers
            • Form Container
            • Tab Panel
            • Split Pane
            • Collapse
            • Accordion Panel
            • Form Component
            • List Form Component
          • Form Inheritance
          • Form Components
        • UI Components
          • Buttons and Text
            • Badge
            • Button
            • Data Label
            • Dropdown
            • Image
            • Label
          • Grids
            • Data Grid
            • Power Grid
            • Table
          • Input Controls
            • Calendar
            • Calendar Inline
            • Checkbox
            • Choice Group
            • Combobox
            • Group Buttons
            • Html Area
            • Input Group
            • Rating
            • Slider
            • Switch
            • Spinner
            • TextArea
            • Textbox
            • TextBoxGroup
            • Type Ahead
            • select2tokenizer
          • Media
            • Carousel
            • Embedded YouTube
            • File upload
            • Image label
            • Lightbox Gallery
            • MultiFile Upload
            • PDF JS Viewer
            • PDF Viewer
          • Mobile
            • Native Data List
            • Native Select
          • Navigation
            • Breadcrumbs
            • Navbar
            • sidenav
          • Visualization
            • DBTreeview
            • Progress Bar
            • Treeview
            • ChartJS
              • Data Labels Plugin
              • Funnel Chart
              • OutLabels Plugin
              • TreeMap
          • Specialized Components
            • Smart Document Editor
            • Servoy PDF Viewer
            • Fullcalendar Component
              • Fullcalendar
              • Fullcalendar Events
              • Migrating calendar from Smart and Web client to NG client
            • Fullcalendar Component 2
            • Canvas
            • Google Charts
            • Google Maps
            • svySignature
            • svywebcam
        • Styling and Themes
          • Default Theme Properties
          • CSS / LESS
          • Component Variants
          • Font Icons
        • Data Modeling
          • Databases
            • Tables
              • Columns
              • Calculations
              • Aggregations
              • Methods
              • Events / Triggers
              • Table security
            • Views
            • Procedures
          • Relations
          • Value Lists
          • Menus
          • In-Memory Databases
          • View Datasource
        • Modular Design
      • Programming Guide
        • Scripting the UI
          • Scripting Forms
          • Interacting with Components
          • Navigation
          • Windows, Dialogs and Popups
          • Events Manager
        • Working with Data
          • Concepts
          • Loading
          • Sorting
          • Iterating
          • Searching
            • Find mode
            • Query Builder
            • SQL String
          • Filtering
          • Editing
          • Validation
        • Automation and Scheduling
          • Batch Processor
          • Headless API
          • Scheduler API
        • Creating REST APIs
        • Consuming Webservices
        • Working with Files
          • File Plugin Basics
          • Images
          • Excel
          • PDF
          • JSON
        • Browser Utilities
          • Notifications
            • Web Notifications (Toastr)
            • Web Notifications (Native)
            • Block UI
          • Session Management
          • Keyboard Utilities
          • NG Utils
        • Sending and Receiving Email
        • Servoy Jasper Reports
          • Input Type
          • Display Mode
          • Output format
          • Jaspe Reports Viewer
        • Extensions
          • Modules
            • svyPhonegap
              • First Use Guide
              • Barcode Scanner
              • Browser
              • Camera
              • File
              • Fingerprint
              • Location
              • Network Interface
              • Phonegap
              • Printer
              • Push Notifications
            • svyAPI
              • Getting Started
            • svyLookup
              • Custom Templates
              • API Documentation
              • svyLookup v1
                • API Documentation v1.0.0
                • Base Form svyLookupTable v1.0.0
                • Base Form AbstractLookup v1.0.0
            • svyNavigation
              • API Documentation
                • API svyNavigation
                • API svyNavigationHistory
                • API svyNavigationUX
            • svyPopupFilter
              • Simple Filter Pickers
              • Custom Templates
              • API Documentation
                • API svyToolbarFilter
                • API svyPopupFilter
              • API Documentation v1
                • API svyToolbarFilter v1
                • API svyPopupFilter v1
            • svySearch
            • svySecurity
              • Overview
              • Token-based Auth and SSO (NEW!)
              • API Documentation
              • Getting Started
              • Tenant replication
              • Security Management Console
                • Classic Security Management Console
              • svySecurityUX
              • svyProperties
              • API Doc svyProperties
            • svyUtils
              • Log Manager
              • Log Manager Appenders
              • Smart Doc Editor Utils
              • Custom Dialogs
              • Excel Utils
                • Full API Reference
              • Crypto Utils
      • Security
        • Authentication
        • Permissions
          • UI Permissions
          • Data Permissions
          • Runtime Permissions
        • Audit Logging
        • OAuth
        • JWT
      • Multi-Language Support
      • Mobile Development
        • Getting Started
        • Mobile Design
        • Native Mobile Integrations
        • Building a Native Binary for the App Store
      • Native Desktop Development
        • NGDesktop UI plugin
        • NGDesktop Utils
        • NGDesktop File Plugin
    • Deploy
      • WAR Deployment
      • Docker Deployment
      • Server Configuration
        • Server Settings
        • Server Plugins
        • Database Servers
          • Locks
          • Transactions
          • Oracle
          • SQLServer
        • Client Sessions
        • Batch Processors
        • License Management
        • Monitoring
          • Server Log
          • Browser Console Log
          • Websocket Log
          • Query Performance
          • Client Performance
          • Client Event Tracing
          • Monitoring Servoy with JMX
      • NGClient deployment
      • Troubleshooting
      • Other Topics
        • Security: Cross-site Scripting
        • Running in an iFrame
    • Extend
    • Contribute
  • Reference
    • Servoy Core
      • Object Model
        • Database Server
          • Table
            • Column
            • Calculation
            • Method
            • Aggregation
          • View
          • Procedure
        • Solution
          • Form
          • Form Component
          • Relation
          • Relation Item
          • Table Node
          • Value List
          • Menu
          • Menu item
          • In-Memory Data Source
          • View Foundset Data Source
          • Variable
          • Column Info
          • Media
          • Layout Container
          • Method
        • i18n Message Key
      • Developer API
        • Globals
        • Forms
          • RuntimeForm
            • controller
            • containers
              • RuntimeContainer
            • elements
              • Component
              • RuntimeAccordionPanel
              • RuntimeBean
              • RuntimeButton
              • RuntimeCalendar
              • RuntimeCheck
              • RuntimeCombobox
              • RuntimeComponent
              • RuntimeDataButton
              • RuntimeDataLabel
              • RuntimeGroup
              • RuntimeHtmlArea
              • RuntimeImageMedia
              • RuntimeInsetList
              • RuntimeLabel
              • RuntimeListBox
              • RuntimePassword
              • RuntimePortal
              • RuntimeRadio
              • RuntimeChecks
              • RuntimeRadios
              • RuntimeRectangle
              • RuntimeRtfArea
              • RuntimeSpinner
              • RuntimeSplitPane
              • RuntimeTabPanel
              • RuntimeTextArea
              • RuntimeTextField
              • RuntimeWebComponent
        • JS Lib
          • Array
          • BigInt
          • Boolean
          • Date
          • Function
          • IterableValue
          • Iterator
          • JSON
          • Map
          • Set
          • Math
          • Namespace
          • Number
          • Object
          • Promise
          • QName
          • RegExp
          • Special Operators
          • Statements
          • String
          • XML
          • XMLList
        • Application
          • APPLICATION_TYPES
          • CLIENTDESIGN
          • DRAGNDROP
          • ELEMENT_TYPES
          • LOGGINGLEVEL
          • NGCONSTANTS
          • UICONSTANTS
          • CSSPosition
          • JSDimension
          • JSDNDEvent
          • JSEvent
          • JSLogger
          • JSLogBuilder
          • JSPoint
          • JSUpload
          • JSWindow
          • JSBounds
          • Renderable
          • UUID
        • SolutionModel
          • ALIGNMENT
          • ANCHOR
          • BEVELTYPE
          • CURSOR
          • DEFAULTS
          • FONTSTYLE
          • MEDIAOPTION
          • PAGEORIENTATION
          • PRINTSLIDING
          • SCROLLBAR
          • TITLEJUSTIFICATION
          • TITLEPOSITION
          • UNITS
          • JSBean
          • JSButton
          • JSCalculation
          • JSComponent
          • JSDataSourceNode
          • JSField
          • JSForm
          • JSLabel
          • JSMedia
          • JSMethod
          • JSPart
          • JSPortal
          • JSRelation
          • JSRelationItem
          • JSStyle
          • JSTab
          • JSTabPanel
          • JSValueList
          • JSVariable
          • JSTitle
          • JSChecks
          • JSCombobox
          • JSHeader
          • JSInsetList
          • JSList
          • JSPassword
          • JSRadios
          • JSText
          • JSTextArea
          • JSWebComponent
          • JSLayoutContainer
        • Database Manager
          • QUERY_COLUMN_TYPES
          • SQL_ACTION_TYPES
          • JSColumn
          • JSDataSet
          • JSBaseRecord
          • JSBaseSqlRecord
          • JSBaseFoundset
          • JSBaseSQLFoundset
          • JSFoundSet
          • JSFoundSetUpdater
          • JSRecord
          • JSRecordMarker
          • JSRecordMarkers
          • JSTable
          • JSTableFilter
          • MenuFoundSet
          • MenuItemRecord
          • QBAggregate
          • QBAggregates
          • QBCase
          • QBCaseWhen
          • QBColumn
          • QBColumns
          • QBCondition
          • QBFunction
          • QBFunctions
          • QBGroupBy
          • QBJoin
          • QBJoins
          • QBLogicalCondition
          • QBParameter
          • QBParameters
          • QBPart
          • QBResult
          • QBSearchedCaseExpression
          • QBSelect
          • QBSort
          • QBSorts
          • QBTableClause
          • QBWhereCondition
          • ViewFoundSet
          • ViewRecord
        • Events Manager
          • EVENTS_AGGREGATION_TYPES
          • EventType
        • Menus
          • JSMenu
          • JSMenuItem
        • JSMenuDatasource
        • Utils
        • Client Utils
          • JSBlobLoaderBuilder
        • History
        • Security
        • i18n
        • ServoyException
          • DataException
        • JSUnit
        • Datasources
          • DBDataSource
          • DBDataSourceServer
          • JSConnectionDefinition
          • JSDataSource
          • MemDataSource
          • MenuDataSource
          • SPDataSource
          • SPDataSourceServer
          • ViewDataSource
        • JSViewDatasource
        • servoyDeveloper
        • enum
    • Server plugins
    • Extensions
      • UI Components
        • Buttons and Text
          • Badge
          • Button
          • Data Label
          • Drop Down
          • Image
          • Label
        • Form Containers
          • Accordion Panel
          • Collapse
          • Form Container
          • Form Component Container
          • List Form Component
          • Default Loading Indicator
          • Error Bean
          • Portal
          • Responsive Container
          • Servoy Default Navigator
          • Slider
          • Split Pane
          • TabPanel
        • Grids
          • Data Grid
          • Power Grid
          • Table
        • Input Controls
          • Calendar
          • Calendar Inline
          • Checkbox
          • Choice Group
          • Combobox
          • Floatinglabel Calendar
          • Floatinglabel Combobox
          • Floatinglabel Textarea
          • Floatinglabel Textbox
          • Floatinglabel Type Ahead
          • Group Buttons
          • Html Area
          • Input Group
          • Rating
          • Select2tokenizer
          • Slider
          • Spinner
          • Switch
          • TextArea
          • TextBox
          • TextBox Group
          • Type Ahead
        • Media
          • Carousel
          • Embedded YouTube
          • File upload
          • Image label
          • Lightbox Gallery
          • MultiFile Upload
          • PDF JS Viewer
          • PDF Viewer
        • Mobile
          • Native Data List
          • Native Select
        • Navigation
          • Breadcrumbs
          • Navbar
          • sidenav
        • SmartDocEditor
          • Smart Document Editor
        • Visualization
          • Canvas
          • Chart
          • Custom List
          • DBTreeview
          • Foundset List
          • Fullcalendar
          • Gauge
          • Google Maps
          • Kanban
          • Progress Bar
          • Treeview
      • Server Plugins
        • amortization
          • AmortizationCalculation
          • Polynomial
        • clientmanager
          • Broadcaster
          • JSClientInformation (cm)
        • excelxport
        • file
          • JSFile
          • JSProgressMonitor
        • headlessclient
          • JSClient
        • http
          • HTTP_STATUS
          • Cookie
          • DeleteRequest
          • GetRequest
          • HeadRequest
          • HttpClient
          • HttpClientConfig
          • OptionsRequest
          • PostRequest
          • PutRequest
          • Response
          • TraceRequest
          • PatchRequest
          • JSFileUpload
        • images
          • JSImage
        • jwt
          • Algorithm
          • Builder
          • JWTClaims
        • mail
          • Attachment
          • MailMessage
        • maintenance
          • JSClientInformation
          • JSColumnObject
          • JSServer
          • JSTableObject
        • mobileservice
          • OfflineDataDescription
        • oauth
          • ClientAuthentication
          • CustomApiBuilder
          • OAuthProviders
          • OAuthRequest
          • OAuthResponse
          • OAuthResponseBinary
          • OAuthResponseJSON
          • OAuthResponseText
          • OAuthService
          • OAuthServiceBuilder
          • OAuthTokenExtractors
          • RequestType
        • pdf_output
        • rawSQL
        • RestWs plugin
        • rest_ws
          • WsContents
          • WsCookie
          • WsRequest
          • WsResponse
        • scheduler
        • serialize
        • textxport
          • DataProviderExport
          • TabExporter
        • udp
          • JSPacket
        • XmlReader
          • XmlNode
      • Browser Plugins
        • Block UI
        • Block UI (ref)
        • Dialogs Plugin
        • Idle
        • Idle (ref)
        • Key Listener
        • Key Listener (ref)
        • NGDesktop File
        • NGDesktop File (ref)
        • NGDesktop UI (ref)
        • NGDesktop Utils (ref)
        • NG Utils (ref)
        • Office Javascript API for Servoy
        • Phonegap
        • Web Notifications (Native)
        • Web Notifications (Toastr)
        • Window Plugin
        • Font Awesome
      • Modules
        • Smart Doc Editor Utils
        • svyAPI
          • Getting Started
        • svyLookup
          • Custom Templates
          • API Documentation
          • svyLookup v1
            • API Documentation v1.0.0
            • Base Form svyLookupTable v1.0.0
            • Base Form AbstractLookup v1.0.0
        • svyLookupExample
        • svyNavigation
          • API Documentation
            • API svyNavigation
            • API svyNavigationHistory
            • API svyNavigationUX
        • svyNavigationUX
        • svyNavigationUXSample
        • svyPopupFilter
          • Simple Filter Pickers
          • Custom Templates
          • API Documentation
            • API svyToolbarFilter
            • API svyPopupFilter
          • API Documentation v1
            • API svyToolbarFilter v1
            • API svyPopupFilter v1
        • svyProperties
        • svySearch
        • svySecurity
          • Overview
          • Token-based Auth and SSO (NEW!)
          • API Documentation
          • Getting Started
          • Tenant replication
          • Security Management Console
            • Classic Security Management Console
          • svySecurityUX
          • svyProperties
          • API Doc svyProperties
        • svySecurityConsole
        • svySecurityUX
        • svyUtils
          • Log Manager
          • Log Manager Appenders
          • Smart Doc Editor Utils
          • Custom Dialogs
          • Excel Utils
          • Full API Reference
          • Crypto Utils
        • svyUtils$Excel
        • svyUtils$NGClient
        • svyUtils$customDialogs
        • svyUtils$logManagerAppenders
        • svyUtils$tableGrid
      • Layout
        • Boostrap 12grid layout
          • Collapsible Container
          • Simple Collapsible
          • Center Container
          • Inline Group Container
          • Flexbox Layout
      • Solutions
        • Sample Application
          • Tutorial Part 1
          • Tutorial Part 2
      • Packages
        • UI Component Packages
          • Advanced Renderers
          • Bootstrap Components
          • Bootstrap Extra Components
          • Canvas
          • Chart JS
          • Fullcalendar Component
          • googlemaps
          • kanban
          • Servoy Core
          • Servoy Extra Components
          • Servoy NG-Grids
          • Servoy PDF Viewer
          • smartDocumentEditor
        • Browser Plugin Packages
          • Block UI
          • Core NG only Services
          • Key Listener
          • NGDesktop File
          • NGDesktop UI
          • NGDesktop Utils
          • Web Notifications
          • Idle Web Service
    • Servoy Developer
      • Menu
        • File
        • Edit
        • Source
        • Refactor
        • Navigate
        • Search
        • Project
        • Actions
        • Run
        • Window
        • Help
      • Toolbar
      • Solution Explorer
        • Resources
          • Database Servers
            • Database Server
              • Procedures
              • Tables
              • Views
          • Security
          • i18n
        • All Solutions
          • Solution
          • Active Solution
            • Scopes
              • Scope
                • Variables
            • Forms
              • Working Set
              • Form
                • Controller
                • Variables
                • Elements
                • Relations
            • Form Components
              • Form Component
            • Relations
              • Relation
            • ValueLists
              • ValueList
            • Menus
              • Menu
                • MenuItem
            • Media
              • Folder
              • File
            • DataSources
              • In Memory DataSources
                • In Memory DataSource
              • View Foundsets DataSources
                • View Foundset DataSources
            • Servoy Packages
              • Package
            • Modules
              • Module
        • Solution Explorer Contextual List
      • Views
        • Command Console
        • Console
        • Problems
        • Tasks
        • Bookmarks
        • Search
        • Form Hierarchy
        • Help
        • JUnit
        • Outline
        • Profiler
        • Properties
        • Project Explorer
        • Call Hierarchy
      • Editors and Wizards
        • Property configurator for columns
        • Relation Editor
        • Text Format Editor
        • Date Format Editor
        • Number Format Editor
        • Database Synchronization Wizard
        • Security Editor
        • SQL Editor
        • i18n Editor
        • File Import Wizard
        • File Export Wizard
        • WAR Export Wizard
        • NGDesktop Export Wizard
        • Table Editor
        • Metadata Synchronization Wizard
        • Database Server Connection Editor
        • Text Property Editor
        • Valuelist Editor
        • Form Editor
          • Parts of the Form Editor
          • Designing a Form
          • Layout Tools
          • Using Containers
          • Creating and Using Forms
          • Using Servoy Beans
          • Using Shapes
          • Form Editor Subtabs
          • [Tips and Shortcuts][reference/servoy-developer/object-editors/form-editor-tips_and_shortcuts.md]
          • Editong a Responsive LayoutForm
          • CSS Positioning
        • Form Hierarchy
        • Component Properties Editor
        • Variable Editor
        • Method Selection Wizard
        • New Solution Wizard
        • Application Event Types Editor
        • New Form Wizard
        • Form Dataproviders Configurator
        • Servoy Resource Locator
        • Datasource Selection Wizard
        • Sorting Fields Wizard
        • Scripting Editor
          • Getting Started-Overview of Script Editor
          • Code Writing Features
          • Code Navigation
          • Code Rewriting Tools
          • Refactoring
          • Code Formatting
          • Script Editor Tips and Shortcuts
          • Unit Tests
        • Theme Editor
          • General Properties
          • Sidenav Properties
          • Navbar Properties
          • Tabs Properties
          • Windows Properties
          • Dialogs Properties
          • Tables Properties
          • Breadcrumb specific style Properties
          • Brand colors Properties
          • Validations Properties
          • Margins and Padding Properties
        • Editor Selection
        • Run Configurations
        • Debug Configurations
        • Externalize Strings Wizard
        • Font Chooser Wizard
        • Color Chooser Wizard
        • Project Properties Configurator
        • Move Wizard
        • External Tools Configurations
        • About Servoy Developer
        • Servoy Developer Installation Details
        • Eclipse Marketplace Wizard
        • Install Available Software Wizard
        • Cheat Sheet Selection Wizard
        • Servoy Developer Help Wizard
        • Switch to Editor Wizard
        • Find Actions Wizard
        • Customize Perspective Configurator
        • Quick Search Wizard
        • Search Wizard
        • Encoding Wizard
        • Task Wizard
        • Find - Replace Wizard
        • Properties Editor
        • New Project Wizard
        • New Method Wizard
        • New Menu Wizard
          • New MenuItem Wizard
        • Menu Editor
        • ServoyMenu Selection Wizard
        • JSMenu compatible component selector
        • Permissions Configuration Dialog
      • Project File Structure
        • Servoy Installation Directory
          • servoy.properties
        • Workspace Folder
          • Resources Directory
            • Database Information (.dbi) Files
          • Solution Folder
      • Package Manager
      • Preferences
      • Property Types for components / services
      • Debugger
        • Debug Explorer
        • Breakpoints
          • Breakpoint Properties
        • Variables
        • Expressions
        • Interactive Console
    • Application Server
    • Servoy Cloud
      • Cloud Control Center
        • Home
          • Setup Namespace
          • User profile
            • My Profile
            • Support
        • Download IDE
        • Application Overview
          • Applications
            • Pipelines
              • Jobs
                • Packages
                  • Commits
                  • Artifacts
                  • Configuration
                  • Quality reports
                  • Build markers
                • Job Configuration
                  • Build and Deploy or Build
                  • Mobile
                  • Desktop
            • Environments
              • Metrics
                • Users
                • Databases
                  • Metrics
                • System Health
                • Log Activity
                • App performance
                • Query performance
              • Cloud reporting
            • Security
              • Permissions
              • Tenants
            • Reports
            • Security Login Designer
              • Single Sign-On
                • Sign in with Google
                • Sign in with Microsoft
          • Code Repositories
        • Project Management
          • Tickets
          • Backlog
          • Active Sprints
        • User Management
          • Users
          • Roles
        • Administration
          • Security
            • ServoyCloud Roles
          • Credentials
          • Settings
        • Add-Ons
      • Database Backup
      • E2E Cypress Testing
        • Using Cypress
      • On-Premise Deployment
      • Privacy policy (ServoyAI)
      • FAQ
      • Migrate to Servoy Cloud
    • Extensions Developement
      • Component and Services
        • Component Development
        • Service Development
        • Tools and Dev Tips to use for Component/Service developement
        • Manifest (.mf file)
        • Specification (.spec file)
          • Property Types
            • Array property types
            • Custom object property types
            • Findmode property type
            • Foundset property type
            • Tags
        • Directives And Filters
          • Sablotabsequence
        • Console (serverside)
        • ServoyApi (serverside)
      • Serverside Plugins
        • Data Convertors and Validators
        • UI Convertors
  • Release notes
    • Release notes
      • 2025.03
      • 2024.03 (LTS)
      • 2023.03 (LTS)
      • 2025.03 (Servoy Cloud)
      • 2024.12
      • 2024.12 (Servoy Cloud)
      • 2024.09
      • 2024.09 (Servoy Cloud)
      • 2024.06
      • 2024.06 (Servoy Cloud)
      • 2024.03 (Servoy Cloud)
      • 2023.12
      • 2023.12 (Servoy Cloud)
      • 2023.09
      • 2023.09 (Servoy Cloud)
      • 2023.06
      • 2022.03 (LTS)
      • 2022.12 What's new
      • 2022.12
      • 2022.09 What's new
      • 2022.09
      • 2022.06 What's new
      • 2022.06
      • 2021.03.3 (LTS)
Powered by GitBook
On this page
  • Overview
  • Functionality
  • Extends
  • Properties Summarized
  • Methods Summarized
  • Properties Detailed
  • alldataproviders
  • multiSelect
  • Methods Detailed
  • addFoundSetFilterParam(query)
  • addFoundSetFilterParam(query, name)
  • addFoundSetFilterParam(dataprovider, operator, value)
  • addFoundSetFilterParam(dataprovider, operator, value, name)
  • clear()
  • createRecord()
  • createRecord(onTop)
  • createRecord(onTop, changeSelection)
  • createRecord(index)
  • createRecord(index, changeSelection)
  • createTableFilterParam(dataprovider, operator, value)
  • deleteAllRecords()
  • deleteRecord()
  • deleteRecord(record)
  • deleteRecord(index)
  • dispose()
  • duplicateFoundSet()
  • duplicateRecord()
  • duplicateRecord(onTop)
  • duplicateRecord(onTop, changeSelection)
  • duplicateRecord(index)
  • duplicateRecord(index, onTop)
  • duplicateRecord(index, onTop, changeSelection)
  • duplicateRecord(index, location)
  • duplicateRecord(index, location, changeSelection)
  • find()
  • forEach(callback)
  • forEach(callback, thisObject)
  • getCurrentSort()
  • getDataProviderValue(dataProviderID)
  • getDataSource()
  • getFoundSetFilterParams()
  • getFoundSetFilterParams(filterName)
  • getName()
  • getOmittedPKs()
  • getParentRecords()
  • getQuery()
  • getQuery(includeFilters)
  • getRecord(index)
  • getRecordByPk(pk)
  • getRecordIndex(record)
  • getRecordIndex(record)
  • getRelationName()
  • getSQL()
  • getSQL(includeFilters)
  • getSQLParameters()
  • getSQLParameters(includeFilters)
  • getSelectedIndex()
  • getSelectedIndexes()
  • getSelectedRecord()
  • getSelectedRecords()
  • getSize()
  • hasConditions()
  • invertRecords()
  • isCleared()
  • isDisposed()
  • isInFind()
  • loadAllRecords()
  • loadOmittedRecords()
  • loadRecords()
  • loadRecords(foundset)
  • loadRecords(dataset)
  • loadRecords(querybuilder)
  • loadRecords(uuidpk)
  • loadRecords(numberpk)
  • loadRecords(queryString)
  • loadRecords(queryString, argumentsArray)
  • newRecord()
  • newRecord(onTop)
  • newRecord(onTop, changeSelection)
  • newRecord(index)
  • newRecord(index, changeSelection)
  • omitRecord()
  • omitRecord(record)
  • omitRecord(index)
  • reloadWithFilters()
  • relookup()
  • relookup(index)
  • removeFoundSetFilterParam(name)
  • revertEditedRecords()
  • save()
  • search()
  • search(clearLastResults)
  • search(clearLastResults, reduceSearch)
  • selectRecord(pkid1, pkid2, pkidn)
  • setDataProviderValue(dataProviderID, value)
  • setFoundSetFilters(filterName, tableFilters)
  • setSelectedIndex(index)
  • setSelectedIndexes(indexes)
  • sort(sortString)
  • sort(sortString, defer)
  • sort(recordComparisonFunction)
  • unrelate()

Was this helpful?

  1. Reference
  2. Servoy Core
  3. Developer API
  4. Database Manager

JSFoundSet

PreviousJSBaseSQLFoundsetNextJSFoundSetUpdater

Last updated 2 months ago

Was this helpful?

Overview

FoundSet serves as the data model for UI components or forms directly linked to a datasource, enabling data manipulation and validation. It supports common operations like sorting, query-based loading, and lazy loading, with features for relation handling and batch data management.

Functionality

FoundSet allows filtering, creating, duplicating, or deleting records with a robust API for data management. Filters can be applied via query builders or column-based conditions and can be removed dynamically. Sorting can be done with predefined strings, deferred execution, or custom comparator functions.

Developers can retrieve the current state of the foundset, including active filters, query parameters, and loaded record indices. FoundSet's structure supports direct interaction with parent or related records, dynamic loading of omitted records, and navigation using indices or primary keys.

FoundSet also offers functionality for find/search operations using SQL-like conditions. It integrates with server-side data sources for data synchronization, enabling a balance of client-side and server-side performance optimization.

Extends

Properties Summarized

Type
Name
Summary

Get all dataproviders of the foundset.

Get or set the multiSelect flag of the foundset.

Methods Summarized

Type
Name
Summary

Add a filter parameter that is permanent per user session to limit a specified foundset of records.

Add a filter parameter that is permanent per user session to limit a specified foundset of records.

Add a filter parameter that is permanent per user session to limit a specified foundset of records.

Add a filter parameter that is permanent per user session to limit a specified foundset of records.

void

Clear the foundset.

Create a new record on top of the foundset and change selection to it.

Create a new record in the foundset.

Create a new record in the foundset.

Create a new record in the foundset and change selection to it at specified index.

Create a new record in the foundset.

Create a table filter that can be applied to the foundset.

Delete all records in foundset, resulting in empty foundset.

Delete currently selected record(s).

Delete record from foundset.

Delete record with the given index.

Dispose a foundset from memory when foundset is no longer needed.

Get a duplicate of the foundset.

Duplicate current record, change selection to new record, place on top.

Duplicate selected record, change selection to new record.

Duplicate selected record.

Duplicate record at index in the foundset, change selection to new record, place on top.

Duplicate record at index in the foundset, change selection to new record.

Duplicate record at index in the foundset.

Duplicate record at index in the foundset, change selection to new record.

Duplicate record at index in the foundset.

Set the foundset in find mode.

Iterates over the records of a foundset taking into account inserts and deletes that may happen at the same time.

Iterates over the records of a foundset taking into account inserts and deletes that may happen at the same time.

Get the current sort columns.

Get a value based on a dataprovider name.

Get the datasource used.

Get the list of previously defined foundset filters.

Get a previously defined foundset filter, using its given name.

Get foundset name.

Returns a JSDataSet with the PKs omitted on this foundset If no PKs have been omitted, an empty JSDataSet will be returned

Gets the parent records when called on a related foundset.

Get the query that the foundset is currently using (as a clone; modifying this QBSelect will not automatically change the foundset).

Get the query that the foundset is currently using (as a clone; modifying this QBSelect will not automatically change the foundset).

Get the record object at the given index.

Get the loaded record based on its primary key values.

Get the record index.

Get the index of a record object inside a foundset

Gets the relation name (null if not a related foundset).

Returns the internal SQL of the JSFoundset.

Returns the internal SQL of the JSFoundset.

Returns the parameters for the internal SQL of the QBSelect.

Returns the parameters for the internal SQL of the QBSelect.

Get the current record index of the foundset.

Get the indexes of the selected records.

Get the selected record.

Get the selected records.

Get the number of records in this foundset.

Check wether the foundset has any conditions from a previous find action.

void

Invert the foundset against all rows of the current table.

Returns a boolean if this foundset is in a cleared state (has the clear condition that is added by a clear() call)

Check if the foundset was disposed.

Check if this foundset is in find mode.

Loads all accessible records from the datasource into the foundset.

Loads the records that are currently omitted as a foundset.

Reloads all last (related) records again, if, for example, after search in tabpanel.

Copies foundset data from another foundset.

Loads a primary key dataset, will remove related sort.

Loads records into form foundset based on a query builder object (also known as 'Form by query').

Loads a single record by primary key, will remove related sort.

Loads a single record by primary key, will remove related sort.

Loads records into form foundset based on a query (also known as 'Form by query').

Loads records into form foundset based on a query (also known as 'Form by query').

Create a new record on top of the foundset and change selection to it.

Create a new record in the foundset and change selection to it.

Create a new record in the foundset.

Create a new record in the foundset and change selection to it.

Create a new record in the foundset.

Omit selected record(s) (add it to omit records list), to be shown with loadOmittedRecords.

Omit record sent as parameter (add it to omit records list), to be shown with loadOmittedRecords.

Omit record under the given index (add it to omit records list), to be shown with loadOmittedRecords.

void

Reloads all last records again with the filters applied.

void

Perform a relookup for the currently selected records Lookups are defined in the dataprovider (columns) auto-enter setting and are normally performed over a relation upon record creation.

void

Perform a relookup for the record under the given index Lookups are defined in the dataprovider (columns) auto-enter setting and are normally performed over a relation upon record creation.

Remove a named foundset filter.

void

Reverts outstanding (not saved) in memory changes from edited records of this foundset.

Saves all outstanding (unsaved) data of this foundset and exits the current record.

Start the database search and use the results, returns the number of records, make sure you did "find" function first.

Start the database search and use the results, returns the number of records, make sure you did "find" function first.

Start the database search and use the results, returns the number of records, make sure you did "find" function first.

Select the record based on pk data.

void

Set a value based on a dataprovider name.

Set multiple foundset filters at the same time.

void

Set the current record index.

void

Set the selected records indexes.

void

Sorts the foundset based on the given sort string.

void

Sorts the foundset based on the given sort string.

void

Sorts the foundset based on the given record comparator function.

Create a new unrelated foundset that is a copy of the current foundset.

Properties Detailed

alldataproviders

Get all dataproviders of the foundset.

Sample

var dataprovidersNames = alldataproviders;
application.output("This foundset has " + dataprovidersNames.length + " data providers.")
for (var i=0; i<dataprovidersNames.length; i++)
	application.output(dataprovidersNames[i]);

multiSelect

Get or set the multiSelect flag of the foundset.

Sample

// allow user to select multiple rows.
foundset.multiSelect = true;

Methods Detailed

addFoundSetFilterParam(query)

Add a filter parameter that is permanent per user session to limit a specified foundset of records.

Filters on tables touched in the query will not be applied to the query filter. For example, when a table filter exists on the order_details table, a query filter with a join from orders to order_details will be applied to the foundset, but the filter condition on the orders_details table will not be included.

Use clear(), reloadWithFilters(), loadRecords() or loadAllRecords() to make the filter effective. Multiple filters can be added to the same dataprovider, they will all be applied.

Parameters

Sample

var query = datasources.db.example_data.orders.createSelect();
query.where.add(
   query.or.add(
            query.columns.shipcity.eq('Amersfoort'))
   .add(    query.columns.shipcity.eq('Amsterdam')));

var success = foundset.addFoundSetFilterParam(query, 'cityFilter'); // possible to add multiple
// Named filters can be removed using foundset.removeFoundSetFilterParam(filterName)

foundset.loadAllRecords(); // to make param(s) effective

addFoundSetFilterParam(query, name)

Add a filter parameter that is permanent per user session to limit a specified foundset of records.

Filters on tables touched in the query will not be applied to the query filter. For example, when a table filter exists on the order_details table, a query filter with a join from orders to order_details will be applied to the foundset, but the filter condition on the orders_details table will not be included.

Use clear(), reloadWithFilters(), loadRecords() or loadAllRecords() to make the filter effective. The filter is removed again using removeFoundSetFilterParam(name).

The table of the query has to be the same as the foundset table.

Parameters

Sample

var query = datasources.db.example_data.orders.createSelect();
query.where.add(
   query.or.add(
            query.columns.shipcity.eq('Amersfoort'))
   .add(    query.columns.shipcity.eq('Amsterdam')));

var success = foundset.addFoundSetFilterParam(query, 'cityFilter'); // possible to add multiple
// Named filters can be removed using foundset.removeFoundSetFilterParam(filterName)

foundset.loadAllRecords(); // to make param(s) effective

addFoundSetFilterParam(dataprovider, operator, value)

Add a filter parameter that is permanent per user session to limit a specified foundset of records. Use clear(), reloadWithFilters(), loadRecords() or loadAllRecords() to make the filter effective. Multiple filters can be added to the same dataprovider, they will all be applied.

Parameters

Sample

var success = foundset.addFoundSetFilterParam('customerid', '=', 'BLONP', 'custFilter'); // possible to add multiple
// Named filters can be removed using foundset.removeFoundSetFilterParam(filterName)

// you can use modifiers in the operator as well, filter on companies where companyname is null or equals-ignore-case 'servoy'
var ok = foundset.addFoundSetFilterParam('companyname', '#^||=', 'servoy')

// Filters with in-conditions can be used with arrays or with custom queries:
success = foundset.addFoundSetFilterParam("productcode", "in", [120, 144, 200]);
success = foundset.addFoundSetFilterParam("city", "in", ["London", "Paris"]);
// use "sql:in" in stead of "in" to allow the value to be interpreted as a custom query
success = foundset.addFoundSetFilterParam("countrycode", "sql:in", "select country code from countries where region in ('Europe', 'Asia')");

foundset.loadAllRecords(); // to make param(s) effective

// see https://wiki.servoy.com/display/DOCS/Using+Table+Filters

addFoundSetFilterParam(dataprovider, operator, value, name)

Add a filter parameter that is permanent per user session to limit a specified foundset of records. Use clear(), reloadWithFilters(), loadRecords() or loadAllRecords() to make the filter effective. The filter is removed again using removeFoundSetFilterParam(name).

Parameters

Sample

var success = foundset.addFoundSetFilterParam('customerid', '=', 'BLONP', 'custFilter'); // possible to add multiple
// Named filters can be removed using foundset.removeFoundSetFilterParam(filterName)

// you can use modifiers in the operator as well, filter on companies where companyname is null or equals-ignore-case 'servoy'
var ok = foundset.addFoundSetFilterParam('companyname', '#^||=', 'servoy')

// Filters with in-conditions can be used with arrays or with custom queries:
success = foundset.addFoundSetFilterParam("productcode", "in", [120, 144, 200]);
success = foundset.addFoundSetFilterParam("city", "in", ["London", "Paris"]);
// use "sql:in" in stead of "in" to allow the value to be interpreted as a custom query
success = foundset.addFoundSetFilterParam("countrycode", "sql:in", "select country code from countries where region in ('Europe', 'Asia')");

foundset.loadAllRecords(); // to make param(s) effective

// see https://wiki.servoy.com/display/DOCS/Using+Table+Filters

clear()

Clear the foundset.

This will set a special condition in the query that makes the query not return any results.

But if new Records are added to this foundset, then those records become the query pk set. So it will then behave the same as loadRecord(pkset) of a pkset of those new records.

You can query for this state in the isCleared() call so you can call loadRecords() to remove that cleared state if needed.

Returns: void

Sample

//Clear the foundset, including searches that may be on it
foundset.clear();

createRecord()

Create a new record on top of the foundset and change selection to it. Returns the new record or null if record was not created.

Sample

var rec = foundset.createRecord(); // add as first record

createRecord(onTop)

Create a new record in the foundset. Returns the new record or null if the record can't be made.

Parameters

Sample

var rec = foundset.createRecord(false); // add as last record, do change selection

createRecord(onTop, changeSelection)

Create a new record in the foundset. Returns the new record or null if the record can't be made.

Parameters

Sample

var rec = foundset.createRecord(false, false); // add as last record, do not change selection

createRecord(index)

Create a new record in the foundset and change selection to it at specified index. Returns the new record or null if the record can't be made.

Parameters

Sample

var rec = foundset.createRecord(1); // add as first record, do change selection

createRecord(index, changeSelection)

Create a new record in the foundset. Returns the new record or null if the record can't be made.

Parameters

Sample

var rec = foundset.createRecord(1, false); // add as first record, do not change selection

createTableFilterParam(dataprovider, operator, value)

Create a table filter that can be applied to the foundset. Multiple filters can be applied at the same time using foundset.setTableFilters().

Parameters

Sample

// filter on messages table where messagesid>10
var filter = foundset.createTableFilterParam('messagesid', '>', 10)

// some filters with in-conditions
var filter = foundset.createTableFilterParam('productcode', 'in', [120, 144, 200])
// use "sql:in" in stead of "in" to allow the value to be interpreted as a custom query
var filter = foundset.createTableFilterParam('countrycode', 'sql:in', 'select country code from countries where region = "Europe"')

// you can use modifiers in the operator as well, filter on companies where companyname is null or equals-ignore-case 'servoy'
var filter = foundset.createTableFilterParam('companyname', '#^||=', 'servoy')

// the value may be null, this will result in 'column is null' sql condition.
var filter = foundset.createTableFilterParam('verified', '=', null)

// apply multiple filters at the same time, previous filters with the same name are removed:
var success = foundset.setTableFilters('myfilters', [filter1, filter2])

deleteAllRecords()

Delete all records in foundset, resulting in empty foundset.

Sample

var success = foundset.deleteAllRecords();

deleteRecord()

Delete currently selected record(s). If the foundset is in multiselect mode, all selected records are deleted.

Sample

var success = foundset.deleteRecord();
//can return false incase of related foundset having records and orphans records are not allowed by the relation

deleteRecord(record)

Delete record from foundset.

Parameters

Sample

var success = foundset.deleteRecord(rec);
//can return false incase of related foundset having records and orphans records are not allowed by the relation

deleteRecord(index)

Delete record with the given index.

Parameters

Sample

var success = foundset.deleteRecord(4);
//can return false incase of related foundset having records and orphans records are not allowed by the relation

dispose()

Dispose a foundset from memory when foundset is no longer needed. Should be used to destroy separate foundsets (is an optimization for memory management). A related foundset or a foundset which is linked to visible forms/components cannot be disposed. Returns whether foundset was disposed or not.

Sample

foundset.dispose();

duplicateFoundSet()

Get a duplicate of the foundset. This is a full copy of the foundset (cached pks,records, relation, filters, search criteria, omitted records, selection).

Sample

var dupFoundset = foundset.duplicateFoundSet();
foundset.find();
//search some fields
var count = foundset.search();
if (count == 0)
{
	plugins.dialogs.showWarningDialog('Alert', 'No records found','OK');
	foundset.loadRecords(dupFoundset);
}

duplicateRecord()

Duplicate current record, change selection to new record, place on top.

Sample

foundset.duplicateRecord();
foundset.duplicateRecord(false); //duplicate the current record, adds at bottom
foundset.duplicateRecord(1,2); //duplicate the first record as second record
//duplicates the record (record index 3), adds on top and selects the record
foundset.duplicateRecord(3,true,true);

duplicateRecord(onTop)

Duplicate selected record, change selection to new record.

Parameters

Sample

foundset.duplicateRecord();
foundset.duplicateRecord(false); //duplicate the current record, adds at bottom
foundset.duplicateRecord(1,2); //duplicate the first record as second record
//duplicates the record (record index 3), adds on top and selects the record
foundset.duplicateRecord(3,true,true);

duplicateRecord(onTop, changeSelection)

Duplicate selected record.

Parameters

Sample

foundset.duplicateRecord();
foundset.duplicateRecord(false); //duplicate the current record, adds at bottom
foundset.duplicateRecord(1,2); //duplicate the first record as second record
//duplicates the record (record index 3), adds on top and selects the record
foundset.duplicateRecord(3,true,true);

duplicateRecord(index)

Duplicate record at index in the foundset, change selection to new record, place on top.

Parameters

Sample

foundset.duplicateRecord();
foundset.duplicateRecord(false); //duplicate the current record, adds at bottom
foundset.duplicateRecord(1,2); //duplicate the first record as second record
//duplicates the record (record index 3), adds on top and selects the record
foundset.duplicateRecord(3,true,true);

duplicateRecord(index, onTop)

Duplicate record at index in the foundset, change selection to new record.

Parameters

Sample

foundset.duplicateRecord();
foundset.duplicateRecord(false); //duplicate the current record, adds at bottom
foundset.duplicateRecord(1,2); //duplicate the first record as second record
//duplicates the record (record index 3), adds on top and selects the record
foundset.duplicateRecord(3,true,true);

duplicateRecord(index, onTop, changeSelection)

Duplicate record at index in the foundset.

Parameters

Sample

foundset.duplicateRecord();
foundset.duplicateRecord(false); //duplicate the current record, adds at bottom
foundset.duplicateRecord(1,2); //duplicate the first record as second record
//duplicates the record (record index 3), adds on top and selects the record
foundset.duplicateRecord(3,true,true);

duplicateRecord(index, location)

Duplicate record at index in the foundset, change selection to new record.

Parameters

Sample

foundset.duplicateRecord();
foundset.duplicateRecord(false); //duplicate the current record, adds at bottom
foundset.duplicateRecord(1,2); //duplicate the first record as second record
//duplicates the record (record index 3), adds on top and selects the record
foundset.duplicateRecord(3,true,true);

duplicateRecord(index, location, changeSelection)

Duplicate record at index in the foundset.

Parameters

Sample

foundset.duplicateRecord();
foundset.duplicateRecord(false); //duplicate the current record, adds at bottom
foundset.duplicateRecord(1,2); //duplicate the first record as second record
//duplicates the record (record index 3), adds on top and selects the record
foundset.duplicateRecord(3,true,true);

find()

Set the foundset in find mode. (Start a find request), use the "search" function to perform/exit the find.

Before going into find mode, all unsaved records will be saved in the database.
If this fails (due to validation failures or sql errors) or is not allowed (autosave off), the foundset will not go into find mode.
Make sure the operator and the data (value) are part of the string passed to dataprovider (included inside a pair of quotation marks).
Note: always make sure to check the result of the find() method.

When in find mode, columns can be assigned string expressions (including operators) that are evaluated as:
General:
      c1||c2    (condition1 or condition2)
      c|format  (apply format on condition like 'x|dd-MM-yyyy')
      !c        (not condition)
      #c        (modify condition, depends on column type)
      ^         (is null)
      ^=        (is null or empty)
      <x        (less than value x)
      >x        (greater than value x)
      <=x       (less than or equals value x)
      >=x       (greater than or equals value x)
      x...y     (between values x and y, including values)
      x         (equals value x)

 Number fields:
      =x       (equals value x)
      ^=       (is null or zero)

 Date fields:
      #c       (equals value x, entire day)
      now      (equals now, date and or time)
      //       (equals today)
      today    (equals today)

 Text fields:
      #c      (case insensitive condition)
      = x     (equals a space and 'x')
      ^=      (is null or empty)
      %x%     (contains 'x')
      %x_y%   (contains 'x' followed by any char and 'y')
      \%      (contains char '%')
      \_      (contains char '_')

Related columns can be assigned, they will result in related searches.
For example, "employees_to_department.location_id = headoffice" finds all employees in the specified location).

Searching on related aggregates is supported.
For example, "orders_to_details.total_amount = '>1000'" finds all orders with total order details amount more than 1000.

Arrays can be used for searching a number of values, this will result in an 'IN' condition that will be used in the search.
The values are not restricted to strings but can be any type that matches the column type.
For example, "record.department_id = [1, 33, 99]"

Multiple Find Records for Logical OR:
It's important to note that when in Find Mode, a foundset will initially contain one record object.
However, multiple record objects may be used to articulate search criteria.
This has the effect that the criteria described in each record are concatenated by a SQL OR.

Sample

if (foundset.find()) //find will fail if autosave is disabled and there are unsaved records
{
	columnTextDataProvider = 'a search value'
	// for numbers you have to make sure to format it correctly so that the decimal point is in your locales notation (. or ,)
	columnNumberDataProvider = '>' + utils.numberFormat(anumber, '####.00');
	columnDateDataProvider = '31-12-2010|dd-MM-yyyy'
	foundset.search()
}

// Multiple Find Records for Logical OR - example
// Find customers in the city of Berlin AND in the postal code 12209...
// OR customers in the city of San Francisco AND in the postal code 94117
if (foundset.find()) // Enter find mode    city = 'Berlin';
{
	city = 'Berlin';   // Assign a search criteria
	postalcode = '12209';
	foundset.newRecord();   // Create a new search record
	city = 'San Francisco';
	postalcode = '94117';
	foundset.search();      // Execute the query and load the records
}

forEach(callback)

Iterates over the records of a foundset taking into account inserts and deletes that may happen at the same time. It will dynamically load all records in the foundset (using Servoy lazy loading mechanism). If callback function returns a non null value the traversal will be stopped and that value is returned. If no value is returned all records of the foundset will be traversed. Foundset modifications( like sort, omit...) cannot be performed in the callback function. If foundset is modified an exception will be thrown. This exception will also happen if a refresh happens because of a rollback call for records on this datasource when iterating. When an exception is thrown from the callback function, the iteration over the foundset will be stopped.

Parameters

Sample

foundset.forEach(function(record,recordIndex,foundset) {
 	//handle the record here
 });

forEach(callback, thisObject)

Iterates over the records of a foundset taking into account inserts and deletes that may happen at the same time. It will dynamically load all records in the foundset (using Servoy lazy loading mechanism). If callback function returns a non null value the traversal will be stopped and that value is returned. If no value is returned all records of the foundset will be traversed. Foundset modifications( like sort, omit...) cannot be performed in the callback function. If foundset is modified an exception will be thrown. This exception will also happen if a refresh happens because of a rollback call for records on this datasource when iterating. When an exception is thrown from the callback function, the iteration over the foundset will be stopped.

Parameters

Sample

foundset.forEach(function(record,recordIndex,foundset) {
 	//handle the record here
 });

getCurrentSort()

Get the current sort columns.

Sample

//reverse the current sort

//the original sort "companyName asc, companyContact desc"
//the inversed sort "companyName desc, companyContact asc"
var foundsetSort = foundset.getCurrentSort()
var sortColumns = foundsetSort.split(',')
var newFoundsetSort = ''
for(var i=0; i<sortColumns.length; i++)
{
	var currentSort = sortColumns[i]
	var sortType = currentSort.substring(currentSort.length-3)
	if(sortType.equalsIgnoreCase('asc'))
	{
		newFoundsetSort += currentSort.replace(' asc', ' desc')
	}
	else
	{
		newFoundsetSort += currentSort.replace(' desc', ' asc')
	}
	if(i != sortColumns.length - 1)
	{
		newFoundsetSort += ','
	}
}
foundset.sort(newFoundsetSort)

getDataProviderValue(dataProviderID)

Get a value based on a dataprovider name.

Parameters

Sample

var val = foundset.getDataProviderValue('contact_name');

getDataSource()

Get the datasource used. The datasource is an url that describes the data source.

Sample

var dataSource = foundset.getDataSource();

getFoundSetFilterParams()

Get the list of previously defined foundset filters.

For column-based table filters, a row of 5 fields per filter are returned. The "columns" of a row from this array are: tablename, dataprovider, operator, value, filtername

For query-based filters, a row of 2 fields per filter are returned. The "columns" of a row from this array are: query, filtername

Sample

var params = foundset.getFoundSetFilterParams()
for (var i = 0; params != null && i < params.length; i++)
{
 if (params[i].length() == 5) {
		application.output('FoundSet filter on table ' + params[i][0] + ': '+ params[i][1] + ' '+params[i][2] + ' '+params[i][3] + (params[i][4] == null ? ' [no name]' : ' ['+params[i][4]+']'))
	}
 if (params[i].length() == 2) {
		application.output('FoundSet filter with query ' + params[i][0]+ ': ' + (params[i][1] == null ? ' [no name]' : ' ['+params[i][1]+']'))
	}
}

getFoundSetFilterParams(filterName)

Get a previously defined foundset filter, using its given name. The result is an array of: [ tableName, dataprovider, operator, value, name ]

Parameters

Sample

var params = foundset.getFoundSetFilterParams()
for (var i = 0; params != null && i < params.length; i++)
{
	application.output('FoundSet filter on table ' + params[i][0]+ ': '+ params[i][1]+ ' '+params[i][2]+ ' '+params[i][3] +(params[i][4] == null ? ' [no name]' : ' ['+params[i][4]+']'))
}

getName()

Get foundset name. If foundset is not named foundset or related foundset will return null.

Sample

var name = foundset.getName()

getOmittedPKs()

Returns a JSDataSet with the PKs omitted on this foundset If no PKs have been omitted, an empty JSDataSet will be returned

Sample

foundset.getOmittedPKs();

getParentRecords()

Gets the parent records when called on a related foundset. (empty array if not a related foundset) Depending on the cardinality of the relation, this method returns either 1 or more records. This can be useful when creating a new record in an empty related foundset and some data from the parent record(s) is needed.

Be aware that if datasources.xxx.getFoundset() is called multiple times on the same datasource it creates multiple foundset instances then the related foundset can have multiple references to the same parent record but in different foundsets. (different instances of the record for the same row in the database) In that case, this method will return the record from the first foundset.

Sample

var parents = relatedFoundset.getParentRecords();

getQuery()

Get the query that the foundset is currently using (as a clone; modifying this QBSelect will not automatically change the foundset). When the foundset is in find mode, the find conditions are included in the resulting query. So the query that would be used when just calling search() (or search(true,true)) is returned. Note that foundset filters are optionally included and table filters are not included in the query.

Sample

var q = foundset.getQuery()
q.where.add(q.columns.x.eq(100))
foundset.loadRecords(q);

getQuery(includeFilters)

Get the query that the foundset is currently using (as a clone; modifying this QBSelect will not automatically change the foundset). When the foundset is in find mode, the find conditions are included in the resulting query. So the query that would be used when just calling search() (or search(true,true)) is returned. Note that foundset filters are optionally included and table filters are not included in the query.

Parameters

Sample

var q = foundset.getQuery()
q.where.add(q.columns.x.eq(100))
foundset.loadRecords(q);

getRecord(index)

Get the record object at the given index. Argument "index" is 1 based (so first record is 1).

Parameters

Sample

var record = foundset.getRecord(index);

getRecordByPk(pk)

Get the loaded record based on its primary key values.

This will only return a record that is already loaded in this foundset; this will not try to load anything from the database.

Parameters

Sample

var record = foundset.getRecordByPk(1); // or getRecordByPk(1,2) or ([1,2]) for multicolumn pk

getRecordIndex(record)

Get the record index. Will return -1 if the record can't be found.

Parameters

Sample

var index = foundset.getRecordIndex(record);

getRecordIndex(record)

Get the index of a record object inside a foundset

Parameters

getRelationName()

Gets the relation name (null if not a related foundset).

Sample

var relName = foundset.getRelationName();

getSQL()

Returns the internal SQL of the JSFoundset. Optionally, the foundset and table filter params can be excluded in the sql (includeFilters=false).

Sample

var sql = foundset.getSQL(true)

getSQL(includeFilters)

Returns the internal SQL of the JSFoundset. Optionally, the foundset and table filter params can be excluded in the sql (includeFilters=false).

Parameters

Sample

var sql = foundset.getSQL(true)

getSQLParameters()

Returns the parameters for the internal SQL of the QBSelect. Table filters are on by default.

Sample

var parameters = foundset.getSQLParameters(true)

getSQLParameters(includeFilters)

Returns the parameters for the internal SQL of the QBSelect. Table filters are on by default.

Parameters

Sample

var parameters = foundset.getSQLParameters(true)

getSelectedIndex()

Get the current record index of the foundset.

Sample

//gets the current record index in the current foundset
var current = foundset.getSelectedIndex();
//sets the next record in the foundset
foundset.setSelectedIndex(current+1);

getSelectedIndexes()

Get the indexes of the selected records. When the foundset is in multiSelect mode (see property multiSelect), a selection can consist of more than one index.

Sample

// modify selection to the first selected item and the following row only
var current = foundset.getSelectedIndexes();
if (current.length > 1)
{
	var newSelection = new Array();
	newSelection[0] = current[0]; // first current selection
	newSelection[1] = current[0] + 1; // and the next row
	foundset.setSelectedIndexes(newSelection);
}

getSelectedRecord()

Get the selected record.

Sample

var selectedRecord = foundset.getSelectedRecord();

getSelectedRecords()

Get the selected records. When the foundset is in multiSelect mode (see property multiSelect), selection can be a more than 1 record.

Sample

var selectedRecords = foundset.getSelectedRecords();

getSize()

Get the number of records in this foundset. This is the number of records loaded, note that when looping over a foundset, size() may increase as more records are loaded.

Sample

var nrRecords = foundset.getSize()

// to loop over foundset, recalculate size for each record
for (var i = 1; i <= foundset.getSize(); i++)
{
	var rec = foundset.getRecord(i);
}

hasConditions()

Check wether the foundset has any conditions from a previous find action.

Sample

if (foundset.hasConditions())
{
		// foundset had find actions
}

invertRecords()

Invert the foundset against all rows of the current table. All records that are not in the foundset will become the current foundset.

Returns: void

Sample

foundset.invertRecords();

isCleared()

Returns a boolean if this foundset is in a cleared state (has the clear condition that is added by a clear() call)

isDisposed()

Check if the foundset was disposed.

When the foundset.dispose() method was called successfully, a foundset can no longer be used.

Sample

// check if the foundset was disposed.
if (foundset.isDisposed())
{
   // foundset cannot be used anymore
}

isInFind()

Check if this foundset is in find mode.

Sample

//Returns true when find was called on this foundset and search has not been called yet
foundset.isInFind();

loadAllRecords()

Loads all accessible records from the datasource into the foundset. Filters on the foundset are applied.

Before loading the records, all unsaved records will be saved in the database. If this fails (due to validation failures or sql errors) or is not allowed (autosave off), records will not be loaded,

Sample

foundset.loadAllRecords();

loadOmittedRecords()

Loads the records that are currently omitted as a foundset.

Before loading the omitted records, all unsaved records will be saved in the database. If this fails (due to validation failures or sql errors) or is not allowed (autosave off), omitted records will not be loaded,

Sample

foundset.loadOmittedRecords();

loadRecords()

Reloads all last (related) records again, if, for example, after search in tabpanel. When in find mode, this will reload the records from before the find() call.

Sample

//to reload all last (related) records again, if for example when searched in tabpanel
 foundset.loadRecords();

loadRecords(foundset)

Copies foundset data from another foundset. This will alter the foundset state to the state of the foundset that is given. If you really just want to use the given foundset on the form itself, then you need to use controller.loadRecords(foundset) that will change the instance of the foundset that is used for this form. Not just update an existing forms foundset.

If you copy over a relation into this foundset, then this foundset will not be a related foundset, it will not automatically update its state of records are updated or added that belong to that relation. It will only be a snapshot of that related foundsets state.

Foundset filter params are copied over from the original/source foundset and are merged with the existing filters on this foundset. So if the original foundset had filters and the given foundset has filters then the resulting foundset will have all the filters of both, If you don't want this and you really want only the state of the given foundset, use controller.loadRecords(fs) instead of foundset.loadRecords(fs)

Parameters

Sample

//Copies foundset data from another foundset
foundset.loadRecords(fs);

loadRecords(dataset)

Loads a primary key dataset, will remove related sort. Tries to preserve selection based on primary key, otherwise first record is selected.

Parameters

Sample

// loads a primary key dataset, will remove related sort!
//var dataset = databaseManager.getDataSetByQuery(...);
// dataset must match the table primary key columns (alphabetically ordered)
foundset.loadRecords(dataset);

loadRecords(querybuilder)

Loads records into form foundset based on a query builder object (also known as 'Form by query'). When the foundset is in find mode, the find states are discarded, the foundset will go out of find mode and the foundset will be loaded using the query. If the foundset is related, the relation-condition will be added to the query. Tries to preserve selection based on primary key, otherwise first record is selected.

The query of the QBSelect that is given is added as a "search" condition to the existing base query of the foundset. This does mean that loadAllRecords() will revert this, because that will clear the search condition and go back to the base query of the foundset. The same holds true for clear() that will also remove the search condition, and, because of that, the given query will also be removed.

If you want to create more a "view" on your database that will always be kept by this foundset, so loadAllRecords() (with our withou first calliing clear()) will always revert back to this set of data (and you can also search inside this data with find/search or adding another query on top of it. Then have a look at datasources.db.server.table.getFoundset(query) because that will generate a foundset with the given query as the base query.

Parameters

Sample

var qb = datasources.db.example_data.orders.createSelect();
qb.result.addPk();
qb.where.add(qb.columns.product_id.eq(1))
foundset.loadRecords(qb);

loadRecords(uuidpk)

Loads a single record by primary key, will remove related sort.

NOTE: This function will return true if the foundset was altered/changed. It is up to the developer to check for the presence of actual data using getSize().

Parameters

Sample

//Loads a single record by primary key, will remove related sort!
foundset.loadRecords(application.getUUID('6b5e2f5d-047e-45b3-80ee-3a32267b1f20'));

loadRecords(numberpk)

Loads a single record by primary key, will remove related sort.

NOTE: This function will return true if the foundset was altered/changed. It is up to the developer to check for the presence of actual data using getSize().

Parameters

Sample

//Loads a single record by primary key, will remove related sort!
foundset.loadRecords(123);

loadRecords(queryString)

Loads records into form foundset based on a query (also known as 'Form by query'). The query must be a valid sql select. If the foundset is related this function is not allowed. Tries to preserve selection based on primary key, otherwise first record is selected. see foundset.loadRecords(QBSelect). When possible, the foundset will be loaded with the given query. This is not always possible because the foundset needs to manipulate the query when adding conditions and joins. In that case the query will be wrapped: select pk from tab where pk = (queryString) The result is the same, except for the ordering in the queryString which will be ignored. The query will be wrapped when one of the following is true:

  • you have no order-by clause

  • you have no from keyword

  • your query is not fully qualified on the main table

  • you have a group-by, having, join or union keyword

Parameters

Sample

//loads records in to the foundset based on a query (also known as 'Form by query')
foundset.loadRecords(sqlstring);

loadRecords(queryString, argumentsArray)

Loads records into form foundset based on a query (also known as 'Form by query'). The query must be a valid sql select. If the foundset is related this function is not allowed. Tries to preserve selection based on primary key, otherwise first record is selected. see foundset.loadRecords(QBSelect). When possible, the foundset will be loaded with the given query. This is not always possible because the foundset needs to manipulate the query when adding conditions and joins. In that case the query will be wrapped: select pk from tab where pk = (queryString) The result is the same, except for the ordering in the queryString which will be ignored. The query will be wrapped when one of the following is true:

  • you have no order-by clause

  • you have no from keyword

  • your query is not fully qualified on the main table

  • you have a group-by, having, join or union keyword

Parameters

Sample

//loads records in to the foundset based on a query (also known as 'Form by query')
foundset.loadRecords(sqlstring,parameters);

newRecord()

Create a new record on top of the foundset and change selection to it. Returns -1 if the record can't be made.

Sample

// foreign key data is only filled in for equals (=) relation items
var idx = foundset.newRecord(false); // add as last record
// foundset.newRecord(); // adds as first record
// foundset.newRecord(2); //adds as second record
if (idx >= 0) // returned index is -1 in case of failure
{
	foundset.some_column = "some text";
	application.output("added on position " + idx);
	// when adding at the end of the foundset, the returned index
	// corresponds with the size of the foundset
}

newRecord(onTop)

Create a new record in the foundset and change selection to it. Returns -1 if the record can't be made.

Parameters

Sample

// foreign key data is only filled in for equals (=) relation items
var idx = foundset.newRecord(false); // add as last record
// foundset.newRecord(); // adds as first record
// foundset.newRecord(2); //adds as second record
if (idx >= 0) // returned index is -1 in case of failure
{
	foundset.some_column = "some text";
	application.output("added on position " + idx);
	// when adding at the end of the foundset, the returned index
	// corresponds with the size of the foundset
}

newRecord(onTop, changeSelection)

Create a new record in the foundset. Returns -1 if the record can't be made.

Parameters

Sample

// foreign key data is only filled in for equals (=) relation items
var idx = foundset.newRecord(false); // add as last record
// foundset.newRecord(); // adds as first record
// foundset.newRecord(2); //adds as second record
if (idx >= 0) // returned index is -1 in case of failure
{
	foundset.some_column = "some text";
	application.output("added on position " + idx);
	// when adding at the end of the foundset, the returned index
	// corresponds with the size of the foundset
}

newRecord(index)

Create a new record in the foundset and change selection to it. Returns -1 if the record can't be made.

Parameters

Sample

// foreign key data is only filled in for equals (=) relation items
var idx = foundset.newRecord(false); // add as last record
// foundset.newRecord(); // adds as first record
// foundset.newRecord(2); //adds as second record
if (idx >= 0) // returned index is -1 in case of failure
{
	foundset.some_column = "some text";
	application.output("added on position " + idx);
	// when adding at the end of the foundset, the returned index
	// corresponds with the size of the foundset
}

newRecord(index, changeSelection)

Create a new record in the foundset. Returns -1 if the record can't be made.

Parameters

Sample

// foreign key data is only filled in for equals (=) relation items
var idx = foundset.newRecord(false); // add as last record
// foundset.newRecord(); // adds as first record
// foundset.newRecord(2); //adds as second record
if (idx >= 0) // returned index is -1 in case of failure
{
	foundset.some_column = "some text";
	application.output("added on position " + idx);
	// when adding at the end of the foundset, the returned index
	// corresponds with the size of the foundset
}

omitRecord()

Omit selected record(s) (add it to omit records list), to be shown with loadOmittedRecords. This operation returns false only when foundset is in bad state (table not accessible or not having a valid selected record) or the record is in an edit state and can't be saved (autosave is false).

Note: The omitted records list is discarded when these functions are executed: loadAllRecords, loadRecords(dataset), loadRecords(sqlstring), invertRecords()

Sample

var success = foundset.omitRecord();

omitRecord(record)

Omit record sent as parameter (add it to omit records list), to be shown with loadOmittedRecords. This operation returns false only when foundset is in bad state (table not accessible or not having a valid selected record) or the record is in an edit state and can't be saved (autosave is false) or record not present in foundset.

Note: The omitted records list is discarded when these functions are executed: loadAllRecords, loadRecords(dataset), loadRecords(sqlstring), invertRecords()

Parameters

Sample

var success = foundset.omitRecord(record);

omitRecord(index)

Omit record under the given index (add it to omit records list), to be shown with loadOmittedRecords. If index is null it behaves just like omitRecord(). This operation returns false when index is invalid (should be between 1 and foundset size) or foundset is in bad state (its table not accessible) or the record is in an edit state and can't be saved (autosave is false). Any retrievable record can be omitted.

Note: The omitted records list is discarded when these functions are executed: loadAllRecords, loadRecords(dataset), loadRecords(sqlstring), invertRecords()

Parameters

Sample

var success = foundset.omitRecord();

reloadWithFilters()

Reloads all last records again with the filters applied.

Returns: void

Sample

foundset.reloadWithFilters();

relookup()

Perform a relookup for the currently selected records Lookups are defined in the dataprovider (columns) auto-enter setting and are normally performed over a relation upon record creation.

Returns: void

Sample

foundset.relookup(1);

relookup(index)

Perform a relookup for the record under the given index Lookups are defined in the dataprovider (columns) auto-enter setting and are normally performed over a relation upon record creation.

Parameters

Returns: void

Sample

foundset.relookup(1);

removeFoundSetFilterParam(name)

Remove a named foundset filter. Use clear(), reloadWithFilters(), loadRecords() or loadAllRecords() to make the filter effective.

Parameters

Sample

var success = foundset.removeFoundSetFilterParam('custFilter');// removes all filters with this name
foundset.loadAllRecords(); // to make param(s) effective

revertEditedRecords()

Reverts outstanding (not saved) in memory changes from edited records of this foundset. Best used in combination with the function databaseManager.setAutoSave()

Returns: void

save()

Saves all outstanding (unsaved) data of this foundset and exits the current record.

search()

Start the database search and use the results, returns the number of records, make sure you did "find" function first. Clear results from previous searches.

Note: Omitted records are automatically excluded when performing a search - meaning that the foundset result by default will not include omitted records.

Sample

var recordCount = foundset.search();
//var recordCount = foundset.search(false,false); //to extend foundset

search(clearLastResults)

Start the database search and use the results, returns the number of records, make sure you did "find" function first. Reduce results from previous searches.

Note: Omitted records are automatically excluded when performing a search - meaning that the foundset result by default will not include omitted records.

Parameters

Sample

var recordCount = foundset.search();
//var recordCount = foundset.search(false,false); //to extend foundset

search(clearLastResults, reduceSearch)

Start the database search and use the results, returns the number of records, make sure you did "find" function first.

Note: Omitted records are automatically excluded when performing a search - meaning that the foundset result by default will not include omitted records.

Parameters

Sample

var recordCount = foundset.search();
//var recordCount = foundset.search(false,false); //to extend foundset

selectRecord(pkid1, pkid2, pkidn)

Select the record based on pk data. Note that if the foundset has not loaded the record with the pk, selectrecord will fail.

In case of a table with a composite key, the pk sequence must match the alphabetical ordering of the pk column names.

Parameters

Sample

foundset.selectRecord(pkid1,pkid2,pkidn);//pks must be alphabetically set! It is also possible to use an array as parameter.

setDataProviderValue(dataProviderID, value)

Set a value based on a dataprovider name.

Parameters

Returns: void

Sample

foundset.setDataProviderValue('contact_name','mycompany');

setFoundSetFilters(filterName, tableFilters)

Set multiple foundset filters at the same time. After all filters have been applied / updated, the foundset will re reloaded immediately with the new filters applied.

The filters that have been applied with the same filter name will be removed and replaced with the new set of filters (which may be empty).

Parameters

Sample

// Create a number of filters
var filter1_10 = foundset.createTableFilterParam('customerid', '=', 10);

var query = datasources.db.example_data.orders.createSelect();
query.where.add(query.columns.shipcity.eq('Amersfoort'));
var filter2 = databaseManager.createTableFilterParam(query);

// apply multiple filters at the same time, previous filters with the same name are removed:
var success = foundset.setFoundSetFilters('myfilters', [filter1_10, filter2])

// update one of the filters:
var filter1_11 = foundset.createTableFilterParam('customerid', '=', 11);

var success = foundset.setFoundSetFilters('myfilters', [filter1_11, filter2])

// filters can be removed by setting them to an empty list:
var success = databaseManager.setTableFilters('myfilters', [])

setSelectedIndex(index)

Set the current record index.

Parameters

Returns: void

Sample

//gets the current record index in the current foundset
var current = foundset.getSelectedIndex();
//sets the next record in the foundset
foundset.setSelectedIndex(current+1);

setSelectedIndexes(indexes)

Set the selected records indexes.

Parameters

Returns: void

Sample

// modify selection to the first selected item and the following row only
var current = foundset.getSelectedIndexes();
if (current.length > 1)
{
	var newSelection = new Array();
	newSelection[0] = current[0]; // first current selection
	newSelection[1] = current[0] + 1; // and the next row
	foundset.setSelectedIndexes(newSelection);
}

sort(sortString)

Sorts the foundset based on the given sort string. Tries to preserve selection based on primary key. If first record is selected or cannot select old record it will select first record after sort. TIP: You can use the Copy button in the developer Select Sorting Fields dialog to get the needed syntax string for the desired sort fields/order.

Parameters

Returns: void

Sample

foundset.sort('columnA desc,columnB asc');

sort(sortString, defer)

Sorts the foundset based on the given sort string. Tries to preserve selection based on primary key. If first record is selected or cannot select old record it will select first record after sort. TIP: You can use the Copy button in the developer Select Sorting Fields dialog to get the needed syntax string for the desired sort fields/order.

Parameters

Returns: void

Sample

foundset.sort('columnA desc,columnB asc');

sort(recordComparisonFunction)

Sorts the foundset based on the given record comparator function. Tries to preserve selection based on primary key. If first record is selected or cannot select old record it will select first record after sort. The comparator function is called to compare two records, that are passed as arguments, and it will return -1/0/1 if the first record is less/equal/greater then the second record.

The function based sorting does not work with printing. It is just a temporary in-memory sort.

NOTE: starting with 7.2 release this function doesn't save the data anymore

Parameters

Returns: void

Sample

foundset.sort(mySortFunction);

function mySortFunction(r1, r2)
{
	var o = 0;
	if(r1.id < r2.id)
	{
		o = -1;
	}
	else if(r1.id > r2.id)
	{
		o = 1;
	}
	return o;
}

unrelate()

Create a new unrelated foundset that is a copy of the current foundset. If the current foundset is not related, no copy will made.

Sample

foundset.unrelate();

Type

Type True if the foundset is in multi-select mode; false otherwise.

query condition to filter on.

Returns: true if adding the filter succeeded, false otherwise.

query condition to filter on.

name String name, used to remove the filter again.

Returns: true if adding the filter succeeded, false otherwise.

dataprovider String column to filter on.

operator String operator: =, <, >, >=, <=, !=, (NOT) LIKE, (NOT) IN, (NOT) BETWEEN and IS (NOT) NULL optionally augmented with modifiers "#" (ignore case) or "^||" (or-is-null), prefix with "sql:" to allow the value to be interpreted as a custom query.

value Object filter value (for in array and between an array with 2 elements)

Returns: true if adding the filter succeeded, false otherwise.

dataprovider String column to filter on.

operator String operator: =, <, >, >=, <=, !=, (NOT) LIKE, (NOT) IN, (NOT) BETWEEN and IS (NOT) NULL optionally augmented with modifiers "#" (ignore case) or "^||" (or-is-null), prefix with "sql:" to allow the value to be interpreted as a custom query.

value Object filter value (for in array and between an array with 2 elements)

name String name, used to remove the filter again.

Returns: true if adding the filter succeeded, false otherwise.

Returns: the new record

onTop when true the new record is added as the topmost record.

Returns: the new record.

onTop when true the new record is added as the topmost record; when false the record is added to the end, if all records are loaded, otherwise it will be added to the top

changeSelection when true the selection is changed to the new record.

Returns: the new record.

index the new record is added at specified index (1-based).

Returns: the new record.

index the new record is added at specified index (1-based).

changeSelection when true the selection is changed to the new record.

Returns: the new record.

dataprovider A specified dataprovider column name.

operator One of "=, <, >, >=, <=, !=, LIKE, or IN" optionally augmented with modifiers "#" (ignore case) or "^||" (or-is-null), prefix with "sql:" to allow the value to be interpreted as a custom query.

value The specified filter value.

Returns: table filter or null when no filter could be created.

Returns: boolean true if all records could be deleted.

Returns: boolean true if all records could be deleted.

record The record to delete from the foundset.

Returns: boolean true if record could be deleted.

index The index of the record to delete.

Returns: boolean true if record could be deleted.

Returns: boolean foundset was disposed

Returns: foundset duplicate.

Returns: 0 if record was not created or the record index if it was created.

onTop when true the new record is added as the topmost record.

Returns: 0 if record was not created or the record index if it was created.

onTop when true the new record is added as the topmost record.

changeSelection when true the selection is changed to the duplicated record.

Returns: 0 if record was not created or the record index if it was created.

index The index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.

Returns: 0 if record was not created or the record index if it was created.

index The index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.

onTop when true the new record is added as the topmost record.

Returns: 0 if record was not created or the record index if it was created.

index The index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.

onTop when true the new record is added as the topmost record.

changeSelection when true the selection is changed to the duplicated record.

Returns: 0 if record was not created or the record index if it was created.

index The index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.

location the new record is added at specified index

Returns: 0 if record was not created or the record index if it was created.

index The index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.

location the new record is added at specified index

changeSelection when true the selection is changed to the duplicated record.

Returns: 0 if record was not created or the record index if it was created.

Returns: true if the foundset is now in find mode, false otherwise.

callback The callback function to be called for each loaded record in the foundset. Can receive three parameters: the record to be processed, the index of the record in the foundset, and the foundset that is traversed.

Returns: Object the return value of the callback

callback The callback function to be called for each loaded record in the foundset. Can receive three parameters: the record to be processed, the index of the record in the foundset, and the foundset that is traversed.

thisObject What the this object should be in the callback function (default it is the foundset)

Returns: Object the return value of the callback

Returns: String sort columns

dataProviderID data provider name

Returns: Object value

Returns: String data source.

Returns: Array of filter definitions.

filterName name of the filter to retrieve.

Returns: Array of filter definitions.

Returns: name.

Returns: a JSDataSet

Returns: an array of records

Returns: query.

includeFilters include the foundset filters, default true.

Returns: query.

index record index (1 based).

Returns: Record record.

pk pk values as array

Returns: Record record.

record Record

Returns: int index.

record the records object

Returns: the index or -1 if not present (anymore)

Returns: String relation name when related.

Returns: String representing the sql of the JSFoundset.

includeFilters include the foundset and table filters [default true].

Returns: String representing the sql of the JSFoundset.

Returns: An Array with the sql parameter values.

includeFilters include the foundset and table filters [default true].

Returns: An Array with the sql parameter values.

Returns: int current index (1-based)

Returns: Array current indexes (1-based)

Returns: Record record.

Returns: Array current records.

Returns: int current size.

Returns: wether the foundset has find-conditions

Returns: boolean true if this foundset is cleared

Returns: True if the foundset has been disposed; false otherwise.

Returns: boolean is in find mode.

Returns: true if records are loaded, false otherwise.

Returns: true if records are loaded, false otherwise.

Returns: true if successful

foundset The foundset to load records from

Returns: true if successful

dataset pkdataset

Returns: true if successful

querybuilder the query builder

Returns: true if successful

uuidpk single-column pk value

Returns: true if successful

numberpk single-column pk value

Returns: true if successful

queryString select statement

Returns: true if successful

queryString select statement

argumentsArray arguments to query

Returns: true if successful

Returns: int index of new record.

onTop when true the new record is added as the topmost record.

Returns: int index of new record.

onTop when true the new record is added as the topmost record; when false the record is added to the end, if all records are loaded, otherwise it will be added to the top

changeSelection when true the selection is changed to the new record.

Returns: int index of new record.

index the new record is added at specified index.

Returns: int index of new record.

index the new record is added at specified index.

changeSelection when true the selection is changed to the new record.

Returns: int index of new record.

Returns: boolean true if all selected record(s) could be omitted.

record Record - The record to be omitted from the foundset.

Returns: boolean true if record could be omitted.

index The index of the record to omit, starting with 1 .

Returns: boolean true if all records could be omitted.

index record index (1-based)

name String filter name.

Returns: true if removing the filter succeeded, false otherwise.

Returns: true if the save was done without an error.

Returns: the recordCount

clearLastResults boolean, clear previous search, default true

Returns: the recordCount

clearLastResults boolean, clear previous search, default true

reduceSearch boolean, reduce (true) or extend (false) previous search results, default true

Returns: the recordCount

pkid1 primary key

pkid2 second primary key (in case of composite primary key)

pkidn nth primary key

Returns: true if succeeded.

dataProviderID data provider name

value value to set

filterName The name of the filter that should be set.

tableFilters list of filters to be applied.

Returns: true if the table filters could be applied.

index index to set (1-based)

indexes An array with indexes to set.

sortString the specified columns (and sort order)

sortString the specified columns (and sort order)

defer when true, the "sortString" will be just stored, without performing a query on the database (the actual sorting will be deferred until the next data loading action).

recordComparisonFunction record comparator function

Returns: FoundSet unrelated foundset.

JSFoundSet
Array
Boolean
QBSelect
Boolean
QBSelect
Object
Boolean
String
String
Object
Boolean
String
String
Object
String
Boolean
JSRecord
Boolean
JSRecord
Boolean
Boolean
JSRecord
Number
JSRecord
Number
Boolean
JSRecord
String
String
Object
JSTableFilter
Boolean
Boolean
JSRecord
Boolean
Number
Boolean
Boolean
JSFoundSet
Number
Boolean
Number
Boolean
Boolean
Number
Number
Number
Number
Boolean
Number
Number
Boolean
Boolean
Number
Number
Number
Number
Number
Number
Boolean
Number
Boolean
Function
Object
Function
Object
Object
String
String
Object
String
Array
String
Array
String
JSDataSet
Array
QBSelect
Boolean
QBSelect
Number
JSRecord
Array
JSBaseSQLRecord
JSRecord
Number
JSRecord
Number
String
String
Boolean
String
Array
Boolean
Array
Number
Array
JSRecord
Array
Number
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
JSFoundSet
Boolean
JSDataSet
Boolean
QBSelect
Boolean
UUID
Boolean
Number
Boolean
String
Boolean
String
Array
Boolean
Number
Boolean
Number
Boolean
Boolean
Number
Number
Number
Number
Boolean
Number
Boolean
JSRecord
Boolean
Number
Boolean
Number
String
Boolean
Boolean
Number
Boolean
Number
Boolean
Boolean
Number
Object
Object
Object
Boolean
String
Object
String
Array
Boolean
Number
Array
String
String
Boolean
Function
JSFoundSet
Array
Boolean
Boolean
Boolean
Boolean
Boolean
JSRecord
JSRecord
JSRecord
JSRecord
JSRecord
JSTableFilter
Boolean
Boolean
Boolean
Boolean
Boolean
JSFoundSet
Number
Number
Number
Number
Number
Number
Number
Number
Boolean
Object
Object
String
Object
String
Array
Array
String
JSDataSet
Array
QBSelect
QBSelect
JSRecord
JSBaseSQLRecord
Number
Number
String
String
String
Array
Array
Number
Array
JSRecord
Array
Number
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
Number
Number
Number
Number
Number
Boolean
Boolean
Boolean
Boolean
Boolean
Number
Number
Number
Boolean
Boolean
JSFoundSet
alldataproviders
multiSelect
addFoundSetFilterParam(query)
addFoundSetFilterParam(query, name)
addFoundSetFilterParam(dataprovider, operator, value)
addFoundSetFilterParam(dataprovider, operator, value, name)
clear()
createRecord()
createRecord(onTop)
createRecord(onTop, changeSelection)
createRecord(index)
createRecord(index, changeSelection)
createTableFilterParam(dataprovider, operator, value)
deleteAllRecords()
deleteRecord()
deleteRecord(record)
deleteRecord(index)
dispose()
duplicateFoundSet()
duplicateRecord()
duplicateRecord(onTop)
duplicateRecord(onTop, changeSelection)
duplicateRecord(index)
duplicateRecord(index, onTop)
duplicateRecord(index, onTop, changeSelection)
duplicateRecord(index, location)
duplicateRecord(index, location, changeSelection)
find()
forEach(callback)
forEach(callback, thisObject)
getCurrentSort()
getDataProviderValue(dataProviderID)
getDataSource()
getFoundSetFilterParams()
getFoundSetFilterParams(filterName)
getName()
getOmittedPKs()
getParentRecords()
getQuery()
getQuery(includeFilters)
getRecord(index)
getRecordByPk(pk)
getRecordIndex(record)
getRecordIndex(record)
getRelationName()
getSQL()
getSQL(includeFilters)
getSQLParameters()
getSQLParameters(includeFilters)
getSelectedIndex()
getSelectedIndexes()
getSelectedRecord()
getSelectedRecords()
getSize()
hasConditions()
invertRecords()
isCleared()
isDisposed()
isInFind()
loadAllRecords()
loadOmittedRecords()
loadRecords()
loadRecords(foundset)
loadRecords(dataset)
loadRecords(querybuilder)
loadRecords(uuidpk)
loadRecords(numberpk)
loadRecords(queryString)
loadRecords(queryString, argumentsArray)
newRecord()
newRecord(onTop)
newRecord(onTop, changeSelection)
newRecord(index)
newRecord(index, changeSelection)
omitRecord()
omitRecord(record)
omitRecord(index)
reloadWithFilters()
relookup()
relookup(index)
removeFoundSetFilterParam(name)
revertEditedRecords()
save()
search()
search(clearLastResults)
search(clearLastResults, reduceSearch)
selectRecord(pkid1, pkid2, pkidn)
setDataProviderValue(dataProviderID, value)
setFoundSetFilters(filterName, tableFilters)
setSelectedIndex(index)
setSelectedIndexes(indexes)
sort(sortString)
sort(sortString, defer)
sort(recordComparisonFunction)
unrelate()