Looking up values with the Google Sheets node is a breeze but what do we do with the normal spreadsheet node?
I have an ID column in the spreadsheet and I just want to return a json array for the specified row
How do I do this?
Looking up values with the Google Sheets node is a breeze but what do we do with the normal spreadsheet node?
I have an ID column in the spreadsheet and I just want to return a json array for the specified row
How do I do this?
Hey @wgicio, so you’d like to have the data of only a single row from your spreadsheet based on a specified ID?
Since the Spreadsheet File node doesn’t include a filter option you’d need to add an IF node to achieve this:
This would let you search for a given ID and only keep the result:
I didnt think of using the IF node as a filter - Learn something new everyday!
Thanks for your help:)
After switching out of testing phase with my workflow and using an expression to lookup the spreadsheet Identifier I’ve discovered that the IF node wont return a true value if it comes in the form of an expression, even just a static number does not work. Looks like a bug:(
Hey @wgicio, this would be because an expression value like this would return a string by default:
If you wrap 9346
in the curly braces that are used to identify expressions like {{9346}}
, the comparison would work as expected:
I’m using a set node and setting the data as a number with the expression
{{$node[“lookupData”].json[“data”][“data2”][“listingID”]}}
It looks like its not respecting the data type and the spreadsheet node is trying to lookup a string.
I’ve changed the column type in the spreadhseet to plain text and it works for now, but I still think something is buggy
So
I have a function code which sets a string
Now if i change the IF node to not an expression it works as expected and the single result is TRUE
What am i missing here, does this IF node not filter with expressions at all?