Created
April 17, 2016 19:16
-
-
Save kbk0125/904c32c27e97a5454e05a43f70f6a2a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First line of function | |
blockspring.runParsed("query-google-spreadsheet", { | |
// Here is where you need to decide what data you are grabbing with the Google query syntax | |
// I am finding elements that match the variable num, which is from a previous part of the code | |
// Google syntax makes you request columns with letters as opposed to your column titles. | |
"query": "SELECT A, C WHERE B ="+num, | |
// This is the full URL of your sheet. Just copy and paste from your browser. | |
"url": "YOURURLHERE" | |
//Cache is false so that your browser does not run an old function when you cnange your code | |
}, { cache: false, expiry: 7200}, function(res) { | |
// All results are part of the res.params.data object. | |
// in my case, I requested two columns from my spreadsheet, one named skill and one named key. | |
//There is one matching row in this case, with two elements | |
var skill=res.params.data[0]['skill']; | |
var key=res.params.data[0]['key']; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment