• DOCUMENTATION
  • WORKATO BLOG
  • PRODUCT BLOG
  • Return to Workato
  • Log in
  • ☰
  • Community/Discussions
Solution home Recipe 101 Formula Mode Tips and Tricks

How to effectively query information in Google Sheets? (using where and pluck functions)

Modified on: Sat, Dec 23, 2017 at 9:36 PM

Using pluck and where functions in formula mode, you can pinpoint and retrieve the data from any cell(s) in google sheets.


Let's start with a list of companies in a google sheets. 


By using the Search Query field in the Search for Rows action in Google sheets, 


we can retrieve the following rows of data, narrowing down the rows to only those whose Status field contains the Accepted value.



Using the Where function

Where is similar to the Search Query field used to search for rows in Google sheets, allowing the user to further narrow down the retrieved rows. 


This formula is used to filter down the rows of companies to only those whose company size is above 100.


In this example, you would retrieve the two rows of data whose company sizes are above 100, and join them up as a string. 


Using the Pluck function

Pluck allows you to retrieve a list of particular fields, instead of the entire row of data.

(Click here to learn more about using the pluck function.)


This formula is similar to the previous one shown in the where function, but appended with a .pluck function with a name parameter. This will result in returning an output of the name field instead of the entire row's information. 

In this example, the final output would be the string result "Beta Co, Echo Inc". 


Formatting the Results

The pluck function will return fields in the form of an array. However, arrays cannot usually be used directly in text fields. You can use additional formulas that convert Arrays into Strings to format the results correctly. Some formulas you can use to do this are: join, smart_join, and to_s. See list of common formulas for help using these functions.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

Related Articles

    Still can't find your solution?

    Visit our forums to search for answers, or post your own questions.

    Documentation
    Developer's Library
    Tutorials
    eBooks
    Product Hour
    Product Blog
    Workato Blog
    Product updates
    Customer Stories
    © Workato 2020   Privacy   Terms   +1 (844) 469-6752
    • Documentation
    • Workato Blog
    • Product Blog
    • Solutions
    • Forums
    • Tickets
    • Log in
    • Return to Workato
    Article views count