Meta tags:
description= Learn how to use Apps Script Class FilterCriteria. Use this class to get information about or copy the criteria on existing filters.;
Headings (most frequently used words):
return, copy, class, filtercriteria, stay, organized, with, collections, save, and, categorize, content, based, on, your, preferences, page, summary, detailed, documentation, common, uses, methods, getcriteriatype, getcriteriavalues, gethiddenvalues, getvisiblebackgroundcolor, getvisibleforegroundcolor, getvisiblevalues, google, workspace, for, developers, tools, connect, criteria, get, values, hidden, by, the, filter,
Text of the page (most frequently used words):
the (88), #criteria (74), filter (67), google (56), api (42), overview (40), const (32), services (29), for (27), color (26), classes (26), and (25), advanced (25), values (23), type (22), enums (21), apps (20), script (20), this (19), returns (19), use (18), console (17), boolean (17), that (17), range (16), column (16), get (16), copy (14), you (14), sheets (14), filtercriteria (13), filters (13), gets (13), spreadsheetapp (12), method (12), null (11), workspace (10), return (10), can (9), create (9), content (9), getactivesheet (9), drive (9), thumb (8), other (8), pivot (8), logs (8), getcolumnfiltercriteria (8), getfilter (8), cloud (7), youtube (7), admin (7), support (7), existing (7), hidden (7), table (7), array (7), string (7), log (7), visible (7), sheet (7), types (7), with (7), filtercriteriabuilder (7), any (7), add (7), resource (7), developer (6), samples (6), addfilter (6), foreground (6), used (6), c20 (6), grid (6), background (6), arguments (6), condition (6), builder (6), chat (6), calendar (6), library (6), blog (5), information (5), down (5), gethiddenvalues (5), pivottable (5), more (5), tables (5), connected (5), getrange (5), hides (5), applied (5), ons (5), gmail (5), client (5), data (5), interfaces (5), groups (5), español (4), products (4), service (4), developers (4), code (4), build (4), about (4), using (4), getcriteriatype (4), getcriteriavalues (4), getvisiblebackgroundcolor (4), getvisibleforegroundcolor (4), based (4), see (4), then (4), database (4), class (4), example (4), people (4), applies (4), copied (4), another (4), copies (4), from (4), card (4), tasks (4), slides (4), docs (4), classroom (4), list (4), resources (4), textstyle (4), side (4), manager (4), analytics (4), all (3), twitter (3), newsletter (3), apis (3), explorer (3), dashboard (3), tools (3), release (3), notes (3), them (3), under (3), tag (3), getvisiblevalues (3), datasourcesheet (3), datasourcepivottable (3), page (3), are (3), license (3), shows (3), default (3), call (3), object (3), booleancriteria (3), following (3), reference (3), home (3), meet (3), forms (3), core (3), projects (3), contenttype (3), listitem (3), triggers (3), group (3), datasource (3), 한국어 (2), 日本語 (2), ภาษาไทย (2), বাংলা (2), हिंदी (2), فارسی (2), العربيّة (2), עברית (2), русский (2), türkçe (2), tiếng (2), việt (2), português (2), brasil (2), polski (2), italiano (2), indonesia (2), français (2), américa (2), latina (2), deutsch (2), english (2), terms (2), platform (2), your (2), need (2), too (2), date (2), last (2), updated (2), 2026 (2), utc (2), columns (2), details (2), createfilter (2), new (2), licensed (2), java (2), its (2), send (2), feedback (2), pivotfiltervalues (2), first (2), empty (2), ashexstring (2), asrgbcolor (2), filtered (2), hexadecimal (2), cells (2), remain (2), modify (2), criteriavalues (2), withcriteria (2), args (2), often (2), without (2), replacing (2), isn (2), criteriatype (2), cell_empty (2), setcolumnfiltercriteria (2), overwrites (2), creates (2), apply (2), methods (2), sample (2), refer (2), newfiltercriteria (2), columnname (2), previews (2), updates (2), codelabs (2), how (2), started (2), training (2), marketplace (2), extend (2), automate (2), share (2), vault (2), sites (2), keep (2), search (2), browser (2), libraries (2), file (2), run (2), manifest (2), visibility (2), verticalalignment (2), updatedraftbodytype (2), status (2), openas (2), onclose (2), horizontalalignment (2), composedemailtype (2), updatedrafttorecipientsaction (2), updatedraftsubjectaction (2), updatedraftccrecipientsaction (2), updatedraftbodyaction (2), updatedraftbccrecipientsaction (2), updatedraftactionresponsebuilder (2), updatedraftactionresponse (2), universalactionresponsebuilder (2), universalactionresponse (2), trigger (2), textinput (2), openlink (2), notification (2), navigation (2), linkpreview (2), image (2), griditem (2), editorfilescopeactionresponsebuilder (2), editorfilescopeactionresponse (2), driveitemsselectedactionresponsebuilder (2), driveitemsselectedactionresponse (2), composeactionresponsebuilder (2), composeactionresponse (2), calendareventactionresponsebuilder (2), calendareventactionresponse (2), buttonset (2), button (2), borderstyle (2), attachment (2), actionresponsebuilder (2), actionresponse (2), action (2), link (2), events (2), eventtype (2), properties (2), lock (2), cache (2), user (2), mimetype (2), url (2), html (2), position (2), textstylebuilder (2), charts (2), text (2), format (2), element (2), document (2), attribute (2), utilities (2), optimization (2), jdbc (2), bigquery (2), field (2), shopping (2), merchant (2), reporting (2), doubleclick (2), video (2), adsense (2), vertex (2), maps (2), contacts (2), migrate (2), themecolortype (2), textdirection (2), themecolor (2), tablerow (2), tablecell (2), selection (2), paragraph (2), namedrange (2), guides (2), manage, cookies, privacy, firebase, chrome, android, connect, watch, tutorials, videos, explore, our, own, ask, question, stack, overflow, read, easy, understand, easytounderstand, solved, problem, solvedmyproblem, otherup, missing, missingtheinformationineed, complicated, many, steps, toocomplicatedtoomanysteps, out, outofdate, issue, samplescodeissue, otherdown, provides, facilitates, copying, retrieves, while, shown, provide, conditions, identify, cell, colors, tell, except, otherwise, noted, registered, trademark, oracle, affiliates, site, policies, apache, creative, commons, attribution, getfiltercriteria, getfilters, getpivottables, only, aren, appropriate, number, their, match, corresponding, when, whennumbergreaterthan, logged, value, some, don, have, cell_not_empty, tostring, representing, active, learn, enum, makes, detailed, documentation, brief, description, given, common, uses, sourcedatacolumn, like, one, allows, outlined_flag, summary, save, categorize, preferences, stay, organized, collections, ruby, python, php, node, net, nullvalue, localizedmessage, executionresponse, executionerror, executestreamresponse, scripts, versions, update, delete, deployments, updatecontent, getmetrics, getcontent, listscriptprocesses, processes, rest, homepagetrigger, editors, addons, entrypointtype, entrypointfeature, conferenceerrortype, entrypoint, conferenceparameter, conferenceerror, conferencedatabuilder, conferencedata, conferencedataservice, conferencing, wrapstyle, workflowdatasourcetype, variablebuttonsize, textinputmode, textbuttonstyle, switchcontroltype, selectioninputtype, responsetype, loadindicator, interaction, inputtype, imagestyle, imagecroptype, imagebuttonstyle, icon, horizontalsizestyle, griditemlayout, expressiondataconditiontype, expressiondataactiontype, driveitemtype, displaystyle, commondatasource, chiplistlayout, bordertype, workflowdatasource, widget, validation, updatedwidget, updatevisibilityaction, timepicker, textparagraph, textbutton, switch, suggestionsresponsebuilder, suggestionsresponse, suggestions, selectioninput, platformdatasource, overflowmenuitem, overflowmenu, materialicon, keyvalue, imagecropstyle, imagecomponent, imagebutton, iconimage, hostappdatasource, fixedfooter, expressiondatacondition, expressiondataaction, expressiondata, eventaction, drivedatasourcespec, divider, dialogaction, dialog, decoratedtext, datetimepicker, datepicker, datasourceconfig, commonwidgetaction, collapsecontrol, chiplist, chip, chatspacedatasource, chatresponsebuilder, chatresponse, chatclientdatasource, chatactionresponse, carouselcard, carousel, cardwithid, cardsection, cardheader, cardbuilder, cardaction, authorizationexception, authorizationaction, actionstatus, cardservice, validationerrorseverity, sendstatus, listtype, fontweight, errorretryability, erroractionability, endnavigation, basicdatatype, addoncomposeuiactiontype, workflowvalidationerroraction, workflowtextformat, workflowaction, variabledata, valuemetadata, updatewidget, updatemessageaction, updateinlinepreviewaction, timestamp, textformaticon, textformatelement, textformatchip, styledtext, saveworkflowaction, returnoutputvariablesaction, returnelementerroraction, resourcetype, resourceretrievedaction, resourcefieldsdefinitionretrievedaction, resourcefield, resourcedata, renderactionbuilder, renderaction, removewidget, removesection, modifycard, listcontainer, insertwidget, insertsection, hyperlink, hostappaction, dynamicresourcedefinition, datatype, dataactionsresponse, createmessageaction, chatmessage, chatdataactionsresponsebuilder, addoncomposeuiactionresponsebuilder, addoncomposeuiactionresponse, accessorywidget, addonsresponseservice, response, quotas, limits, allowlist, urls, macros, web, executables, event, objects, installable, simple, automation, project, triggersource, installationsource, authorizationstatus, authmode, triggerbuilder, statetokenbuilder, spreadsheettriggerbuilder, formtriggerbuilder, documenttriggerbuilder, clocktriggerbuilder, calendartriggerbuilder, authorizationinfo, scriptapp, userproperties, scriptproperties, propertiesservice, lockservice, cacheservice, weekday, month, colortype, blobsource, rgbcolor, promptresponse, menu, blob, session, logger, base, execution, mailapp, mail, xframeoptionsmode, sandboxmode, htmltemplate, htmloutputmetatag, htmloutput, htmlservice, host, history, textoutput, contentservice, pointstyle, pickervalueslayout, orientation, matchtype, curvestyle, columntype, charttype, chartmergestrategy, charthiddendimensionstrategy, datatablesource, tablechartbuilder, stringfilterbuilder, scatterchartbuilder, piechartbuilder, numberrangefilterbuilder, linechartbuilder, dataviewdefinitionbuilder, dataviewdefinition, datatablebuilder, datatable, columnchartbuilder, chartoptions, chart, barchartbuilder, areachartbuilder, processinginstruction, namespace, entityref, doctype, comment, cdata, xmlservice, xml, rsaalgorithm, macalgorithm, digestalgorithm, charset, variabletype, linearoptimizationsolution, linearoptimizationengine, linearoptimizationconstraint, linearoptimizationservice, usability, httpresponse, urlfetchapp, fetch, jdbctimestamp, jdbctime, jdbcstruct, jdbcstatement, jdbcsavepoint, jdbcsqlxml, jdbcrowid, jdbcresultsetmetadata, jdbcresultset, jdbcref, jdbcpreparedstatement, jdbcparametermetadata, jdbcdate, jdbcdatabasemetadata, jdbcconnection, jdbcclob, jdbccallablestatement, jdbcblob, jdbcarray, connections, utility, fieldtype, bigqueryparametertype, authtype, aggregationtype, usererror, textarea, setcredentialsresponse, selectsingle, selectmultiple, optionbuilder, info, getschemaresponse, getdataresponse, getauthtyperesponse, fields, debugerror, config, communityconnector, checkbox, bigqueryconfig, datastudioapp, studio, dcm, dfa, trafficking, campaigns, dbm, bid, dv360, display, 360, management, ads, center, languageapp, translate, mode, markersize, avoid, staticmapenums, staticmap, geocoder, elevationsampler, directionfinderenums, directionfinder, sensitivity, priority, gender, extendedfield, urlfield, phonefield, imfield, emailfield, datefield, customfield, contactgroup, contact, companyfield, addressfield, contactsapp, identity, role, groupsapp, videosourcetype, textbaselineoffset, spacingmode, slideposition, slidelinkingmode, sheetschartembedtype, shapetype, selectiontype, predefinedlayout, placeholdertype, paragraphalignment, pagetype, pageelementtype, pagebackgroundtype, listpreset, linktype, linetype, linefilltype, linecategory, filltype, dashstyle, contentalignment, cellmergestate, autofittype, autotexttype, arrowstyle, alignmentposition, wordart, textrange, tablecolumn, tablecellrange, speakerspotlight, solidfill, slide, sheetschart, shape, presentation, point, picturefill, paragraphstyle, pagerange, pageelementrange, pageelement, pagebackground, notespage, notesmaster, master, liststyle, linefill, line, layout, fill, connectionsite, colorscheme, border, autofit, autotext, affinetransformbuilder, affinetransform, slidesapp, wrapstrategy, valuetype, texttocolumnsdelimiter, sortorder, sheettype, relativedate, recalculationinterval, protectiontype, pivotvaluedisplaytype, pivottablesummarizefunction, interpolationtype, groupcontroltoggleposition, frequencytype, direction, dimension, developermetadatavisibility, developermetadatalocationtype, datetimegroupingruletype, datavalidationcriteria, datasourcetype, datasourcerefreshscope, datasourceparametertype, dataexecutionstate, dataexecutionerrorcode, copypastetype, bandingtheme, autofillseries, textrotation, textfinder, spreadsheettheme, spreadsheet, sortspec, slicer, richtextvaluebuilder, richtextvalue, rangelist, protection, pivotvalue, pivotgrouplimit, pivotgroup, pivotfilter, pageprotection, overgridimage, gradientcondition, embeddedtablechartbuilder, embeddedscatterchartbuilder, embeddedpiechartbuilder, embeddedlinechartbuilder, embeddedhistogramchartbuilder, embeddedcombochartbuilder, embeddedcolumnchartbuilder, embeddedchartbuilder, embeddedchart, embeddedbarchartbuilder, embeddedareachartbuilder, drawing, developermetadatalocation, developermetadatafinder, developermetadata, datetimegroupingrule, datavalidationbuilder, datavalidation, datasourcetablefilter, datasourcetablecolumn, datasourcetable, datasourcespecbuilder, datasourcespec, datasourcesheetfilter, datasourcerefreshschedulefrequency, datasourcerefreshschedule, datasourceparameter, datasourceformula, datasourcecolumn, datasourcechart, lookerdatasourcespecbuilder, lookerdatasourcespec, dataexecutionstatus, bigquerydatasourcespecbuilder, bigquerydatasourcespec, containerinfo, conditionalformatrulebuilder, conditionalformatrule, colorbuilder, cellimagebuilder, cellimage, booleancondition, banding, gmailthread, gmailmessage, gmaillabel, gmaildraft, gmailattachment, gmailapp, ratingicontype, pagenavigationtype, itemtype, feedbacktype, destinationtype, alignment, item, videoitem, timeitem, textvalidationbuilder, textvalidation, textitem, sectionheaderitem, scaleitem, ratingitem, quizfeedbackbuilder, quizfeedback, paragraphtextvalidationbuilder, paragraphtextvalidation, paragraphtextitem, pagebreakitem, multiplechoiceitem, itemresponse, imageitem, gridvalidationbuilder, gridvalidation, formresponse, form, durationitem, datetimeitem, dateitem, choice, checkboxvalidationbuilder, checkboxvalidation, checkboxitem, checkboxgridvalidationbuilder, checkboxgridvalidation, checkboxgriditem, formapp, labels, activity, permission, access, folderiterator, folder, fileiterator, driveapp, textalignment, tabtype, positionedlayout, paragraphheading, glyphtype, fontfamily, elementtype, unsupportedelement, tableofcontents, tab, richlink, rangeelement, rangebuilder, positionedimage, person, pagebreak, inlineimage, inlinedrawing, horizontalrule, headersection, footnotesection, footnote, footersection, equationsymbol, equationfunctionargumentseparator, equationfunction, equation, documenttab, containerelement, bookmark, body, documentapp, gueststatus, eventtransparency, eventcolor, recurrencerule, eventrecurrence, eventguest, calendareventseries, calendarevent, calendarapp, reports, reseller, settings, migration, enterprise, directory, sign, skip, main,
Text of the page (random words):
lsresponse textarea textinput usererror enums aggregationtype authtype bigqueryparametertype fieldtype google tables advanced services tables api google tag manager advanced services tag manager api utility services api database connections bigquery advanced services bigquery api jdbc overview jdbc classes jdbcarray jdbcblob jdbccallablestatement jdbcclob jdbcconnection jdbcdatabasemetadata jdbcdate jdbcparametermetadata jdbcpreparedstatement jdbcref jdbcresultset jdbcresultsetmetadata jdbcrowid jdbcsqlxml jdbcsavepoint jdbcstatement jdbcstruct jdbctime jdbctimestamp url fetch overview urlfetchapp classes httpresponse data usability optimization optimization overview linearoptimizationservice classes linearoptimizationconstraint linearoptimizationengine linearoptimizationsolution enums status variabletype utilities overview utilities enums charset digestalgorithm macalgorithm rsaalgorithm xml overview xmlservice classes attribute cdata comment doctype document element entityref format namespace processinginstruction text interfaces content enums contenttype html content charts overview charts classes areachartbuilder barchartbuilder chart chartoptions columnchartbuilder datatable datatablebuilder dataviewdefinition dataviewdefinitionbuilder linechartbuilder numberrangefilterbuilder piechartbuilder scatterchartbuilder stringfilterbuilder tablechartbuilder textstyle textstylebuilder interfaces datatablesource enums charthiddendimensionstrategy chartmergestrategy charttype columntype curvestyle matchtype orientation pickervalueslayout pointstyle position content overview contentservice classes textoutput enums mimetype html overview google script history client side google script host client side google script run client side google script url client side htmlservice classes htmloutput htmloutputmetatag htmltemplate enums sandboxmode xframeoptionsmode mail overview mailapp script execution information base overview browser logger mimetype session console classes blob menu promptresponse rgbcolor ui user interfaces blobsource enums button buttonset colortype month weekday cache overview cacheservice classes cache lock overview lockservice classes lock properties overview propertiesservice scriptproperties userproperties classes properties script overview scriptapp classes authorizationinfo calendartriggerbuilder clocktriggerbuilder documenttriggerbuilder formtriggerbuilder service spreadsheettriggerbuilder statetokenbuilder trigger triggerbuilder enums authmode authorizationstatus eventtype installationsource triggersource script project resources automation triggers and events simple triggers installable triggers event objects manifest overview libraries advanced services web apps and api executables sheets macros allowlist urls quotas limits google workspace add ons services add ons response overview addonsresponseservice classes accessorywidget action actionresponse actionresponsebuilder addoncomposeuiactionresponse addoncomposeuiactionresponsebuilder attachment calendareventactionresponse calendareventactionresponsebuilder chatdataactionsresponsebuilder chatmessage color composeactionresponse composeactionresponsebuilder createmessageaction dataactionsresponse datatype driveitemsselectedactionresponse driveitemsselectedactionresponsebuilder dynamicresourcedefinition editorfilescopeactionresponse editorfilescopeactionresponsebuilder hostappaction hyperlink insertsection insertwidget link linkpreview listcontainer listitem modifycard navigation notification openlink removesection removewidget renderaction renderactionbuilder resourcedata resourcefield resourcefieldsdefinitionretrievedaction resourceretrievedaction resourcetype returnelementerroraction returnoutputvariablesaction saveworkflowaction styledtext textformatchip textformatelement textformaticon timestamp universalactionresponse universalactionresponsebuilder updatedraftactionresponse updatedraftactionresponsebuilder updatedraftbccrecipientsaction updatedraftbodyaction updatedraftccrecipientsaction updatedraftsubjectaction updatedrafttorecipientsaction updateinlinepreviewaction updatemessageaction updatewidget valuemetadata variabledata workflowaction workflowtextformat workflowvalidationerroraction enums addoncomposeuiactiontype basicdatatype composedemailtype contenttype endnavigation erroractionability errorretryability fontweight listtype onclose openas sendstatus textstyle updatedraftbodytype validationerrorseverity card overview cardservice classes action actionresponse actionresponsebuilder actionstatus attachment authorizationaction authorizationexception borderstyle button buttonset calendareventactionresponse calendareventactionresponsebuilder card cardaction cardbuilder cardheader cardsection cardwithid carousel carouselcard chatactionresponse chatclientdatasource chatresponse chatresponsebuilder chatspacedatasource chip chiplist collapsecontrol column columns commonwidgetaction composeactionresponse composeactionresponsebuilder condition datasourceconfig datepicker datetimepicker decoratedtext dialog dialogaction divider drivedatasourcespec driveitemsselectedactionresponse driveitemsselectedactionresponsebuilder editorfilescopeactionresponse editorfilescopeactionresponsebuilder eventaction expressiondata expressiondataaction expressiondatacondition fixedfooter grid griditem hostappdatasource iconimage image imagebutton imagecomponent imagecropstyle keyvalue linkpreview materialicon navigation notification openlink overflowmenu overflowmenuitem platformdatasource selectioninput suggestions suggestionsresponse suggestionsresponsebuilder switch textbutton textinput textparagraph timepicker trigger universalactionresponse universalactionresponsebuilder updatedraftactionresponse updatedraftactionresponsebuilder updatedraftbccrecipientsaction updatedraftbodyaction updatedraftccrecipientsaction updatedraftsubjectaction updatedrafttorecipientsaction updatevisibilityaction updatedwidget validation widget workflowdatasource enums bordertype chiplistlayout commondatasource composedemailtype contenttype displaystyle driveitemtype expressiondataactiontype expressiondataconditiontype griditemlayout horizontalalignment horizontalsizestyle icon imagebuttonstyle imagecroptype imagestyle inputtype interaction loadindicator onclose openas responsetype selectioninputtype status switchcontroltype textbuttonstyle textinputmode updatedraftbodytype variablebuttonsize verticalalignment visibility workflowdatasourcetype wrapstyle conferencing data overview conferencedataservice classes conferencedata conferencedatabuilder conferenceerror conferenceparameter entrypoint enums conferenceerrortype entrypointfeature entrypointtype manifest addons resource calendar resource drive resource gmail resource editors resource meet resource homepagetrigger resource add ons api apps script api v1 overview rest resources processes overview list listscriptprocesses projects overview create get getcontent getmetrics updatecontent projects deployments overview create delete get list update projects versions overview create get list scripts overview run types executestreamresponse executionerror executionresponse file localizedmessage nullvalue client libraries browser go java core library api library net core library api library node js php python core library api library ruby google workspace apps admin console cloud search gmail google calendar google chat google classroom google docs google drive google forms google keep google meet google sheets google sites google slides google tasks google vault extend automate share add ons apps script chat apps drive apps marketplace tools admin console apps script dashboard google cloud console apis explorer card builder training support how to get started codelabs developer support updates release notes developer previews youtube newsletter x twitter blog home google workspace apps script reference send feedback class filtercriteria stay organized with collections save and categorize content based on your preferences page summary outlined_flag filtercriteria allows you to get information about or copy the criteria on existing filters you can create criteria for any filter type using spreadsheetapp newfiltercriteria and filtercriteriabuilder you can copy filter criteria from one column to another using the copy method the gethiddenvalues method returns the values that a filter hides in grid sheets methods like getvisiblebackgroundcolor and getvisibleforegroundcolor return color based filter criteria for grid sheets filtercriteria use this class to get information about or copy the criteria on existing filters to create a new filter refer to the following for sheets use range createfilter for pivot tables use pivottable addfilter sourcedatacolumn filtercriteria for sheets that are connected to a database use datasourcesheet addfilter columnname filtercriteria for pivot tables that are connected to a database use datasourcepivottable addfilter columnname filtercriteria to create the criteria for any type of filter refer to spreadsheetapp newfiltercriteria and filtercriteriabuilder common uses copy criteria the following sample gets the filter that applies to the range a1 c20 gets the criteria applied to column c and copies the criteria to column b const ss spreadsheetapp getactivesheet const range ss getrange a1 c20 copies the filter criteria applied to column c const filter range getfilter const criteria filter getcolumnfiltercriteria 3 copy build applies the copied criteria to column b the copied criteria overwrites any existing criteria on column b filter setcolumnfiltercriteria 2 criteria get values hidden by the filter the following sample gets the filter that applies to the given range and logs the values from column b that the filter hides const ss spreadsheetapp getactivesheet const range ss getrange a1 c20 const filter range getfilter gets the filter criteria applied to column b then gets the hidden values const filtercriteria filter getcolumnfiltercriteria 2 gethiddenvalues logs the hidden values console log filtercriteria methods method return type brief description copy filter criteria builder copies this filter criteria and creates a criteria builder that you can apply to another filter get criteria type boolean criteria null returns the criteria s boolean type for example cell_empty get criteria values object returns an array of arguments for boolean criteria get hidden values string returns the values that the filter hides get visible background color color null returns the background color used as filter criteria get visible foreground color color null returns the foreground color used as a filter criteria get visible values string returns the values that the pivot table filter shows detailed documentation copy copies this filter criteria and creates a criteria builder that you can apply to another filter you can use this method with any type of filter if you re using a sheet filter you can copy the criteria to another column const ss spreadsheetapp getactivesheet const filter ss getfilter makes a copy of the filter criteria applied to column c const criteria filter getcolumnfiltercriteria 3 copy build applies the copied criteria to column b the copied criteria overwrites any existing criteria on column b filter setcolumnfiltercriteria 2 criteria return filtercriteriabuilder a filter criteria builder based on this filter criteria getcriteriatype returns the criteria s boolean type for example cell_empty to learn about the types of boolean criteria see the booleancriteria enum people often use this method to add boolean condition criteria to a filter without replacing existing criteria to get the arguments for the criteria use getcriteriavalues to use the criteria type and criteria values to create or modify filter criteria see filtercriteriabuilder withcriteria criteria args you can use this method for any type of filter if the filter criteria isn t a boolean condition returns null const ss spreadsheetapp getactivesheet gets the filter on the active sheet const filter ss getfilter gets the criteria type and returns a string representing the criteria type object const criteriatype filter getcolumnfiltercriteria 2 getcriteriatype tostring logs the criteria type console log criteriatype return booleancriteria null the type of boolean criteria or null if the criteria isn t a boolean condition getcriteriavalues returns an array of arguments for boolean criteria some boolean criteria types don t have arguments and return an empty array for example cell_not_empty people often use this method to add boolean condition criteria to a filter without replacing existing criteria to get the boolean criteria type use getcriteriatype to use the criteria type and criteria values to create or modify a filter criteria see filtercriteriabuilder withcriteria criteria args you can use this method for any type of filter const ss spreadsheetapp getactivesheet const filter ss getfilter gets the values of the boolean criteria and logs them for example if the boolean condition is whennumbergreaterthan 10 then the logged value is 10 const criteriavalues filter getcolumnfiltercriteria 2 getcriteriavalues console log criteriavalues return object an array of arguments appropriate to the boolean criteria type the number of arguments and their type match the corresponding when method of the filtercriteriabuilder class gethiddenvalues returns the values that the filter hides use this criteria with filters on grid sheets the default type of sheet returns null if you call this method for other types of filters const ss spreadsheetapp getactivesheet const range ss getrange a1 c20 const filter range getfilter gets the filter criteria applied to column b then gets the hidden values const filtercriteria filter getcolumnfiltercriteria 2 gethiddenvalues logs the hidden values console log filtercriteria return string an array of values that the filter hides getvisiblebackgroundcolor returns the background color used as filter criteria cells with this background color remain visible use this criteria with filters on grid sheets the default type of sheet returns null if you call this method for other types of filters const ss spreadsheetapp getactivesheet const range ss getrange a1 c20 logs the background color that column b is filtered by as a hexadecimal string const filter range getfilter const color filter getcolumnfiltercriteria 2 getvisiblebackgroundcolor asrgbcolor ashexstring console log color return color null the background color used as filter criteria getvisibleforegroundcolor returns the foreground color used as a filter criteria cells with this foreground color remain visible use this criteria with filters on grid sheets the default type of sheet returns null if you call this method for other types of filters const ss spreadsheetapp getactivesheet const range ss getrange a1 c20 logs the foreground color that column b is filtered by as a hexadecimal string cons...
|