Title: Using User Meta Data to return rows
Last modified: August 24, 2016

---

# Using User Meta Data to return rows

 *  Resolved [jenefer](https://wordpress.org/support/users/jenefer/)
 * (@jenefer)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-user-meta-data-to-return-rows/)
 * Hi,
 * I am trying to build an online area where a company can register and then submit
   data. When the company registers I store the company name on the users profile
   and when they submit data to spreadsheet the company name is submitted to column
   A. I want to be able to bring back just that company’s data.
 * So far I have this where I have manually entered the company’s name – Test:
 * [gdoc key=”[https://docs.google.com/spreadsheets/d/1E_0ODN7VCV_EDrTZK97Kwtx211cLQiFGL41X-z0T83U/edit&#8221](https://docs.google.com/spreadsheets/d/1E_0ODN7VCV_EDrTZK97Kwtx211cLQiFGL41X-z0T83U/edit&#8221);
   query=”select A where A = `Test`“]
 * This doesn’t work anyway but I wanted to know how I could replace the word Test
   with the user company name?
 * Thanks
    Jenefer
 * [https://wordpress.org/plugins/inline-google-spreadsheet-viewer/](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/using-user-meta-data-to-return-rows/#post-6073945)
 * Use the `gdoc_query` plugin filter hook. From the [Other Notes](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/other_notes/)
   page under the **Filters** heading:
    - `gdoc_query` – Filters the Google Visualization API query language query. 
      The first argument is the string supplied to the query attribute, or false
      if no query was supplied. The second argument is an array of all the attributes
      and their values passed to the current invocation of the shortcode.
 *  - A common use case for this filter is to query a Google Spreadsheet using dynamically
      generated content, such as the email address or username of a logged-in user.
 * Also, as you are trying to retrieve rows based on a string, you should quote 
   the string in your `where` clause. See the [Google Query Language Reference page](https://developers.google.com/chart/interactive/docs/querylanguage)
   for details about the correct syntax for a querystring.

Viewing 1 replies (of 1 total)

The topic ‘Using User Meta Data to return rows’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/inline-google-spreadsheet-viewer.
   svg)
 * [Inline Google Spreadsheet Viewer](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/)
 * [Active Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Meitar](https://wordpress.org/support/users/meitar/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/using-user-meta-data-to-return-rows/#post-6073945)
 * Status: resolved