You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I keep getting key errors when using query with a table that contains the new QB address fields. The 'hidden' fields for the address components do not have a label in fields[field.attrib['id']] and so you get a key error.
Could you also explain how queries are formed? I can't see how to map a QB query - such as - {'fid'.operator.'matching_value'} - onto a python dict.
I keep getting key errors when using query with a table that contains the new QB address fields.
I'm not familiar with the new QB fields. Could you please describe the issue in more detail and perhaps include a link to relevant documentation?
Could you also explain how queries are formed?
To execute a query, just set the query string as the query key of the input dict. I would recommend using the SQL function, though. For instance, you could do
SELECT * FROM table WHERE fid`operator`matching_value
Hi - thanks for the quick response - sorry I thought this was an official Quickbase API.
The new address fields are quite unique. They are composed of multiple fields when output to CSV but in QB they appear as a single field with the ability to Google an address.
I did some tests and the Key Error occurs because the hidden fields do not have an 'id' when accessed via the method you use. If you add the following then it 'fixes' the issue but you can't tell which fields are which as far as I can see (e.g. postcode versus state versus street etc).
if(field.tag == "f") and 'id' in field.attrib:
if field.attrib['id'] in fields:
temp[fields[field.attrib['id']]] = field.text
else:
bodge = "Address-%s" % ( field.attrib['id'] )
temp[bodge] = field.text
I previously used the API from https://github.com/oysterhotels/quickbase, which seems to get the field names without spaces and in their original format - but this also breaks with the new addresses because the field for State/Region includes an illegal character '/' when trying to edit!
Thanks for the SQL query - I've got that working now. I had assumed you would submit a 'Field Name'.XCT.'Value' style query via your query() function somehow.
Activity
nhynes commentedon Jun 15, 2014
I'm not familiar with the new QB fields. Could you please describe the issue in more detail and perhaps include a link to relevant documentation?
To execute a query, just set the query string as the
querykey of the input dict. I would recommend using the SQL function, though. For instance, you could dograhamdavies commentedon Jun 15, 2014
Hi - thanks for the quick response - sorry I thought this was an official Quickbase API.
The new address fields are quite unique. They are composed of multiple fields when output to CSV but in QB they appear as a single field with the ability to Google an address.
http://quickbase.intuit.com/developer/knowledge-base/how-do-i-update-my-app-use-new-address-fields
I did some tests and the Key Error occurs because the hidden fields do not have an 'id' when accessed via the method you use. If you add the following then it 'fixes' the issue but you can't tell which fields are which as far as I can see (e.g. postcode versus state versus street etc).
I previously used the API from https://github.com/oysterhotels/quickbase, which seems to get the field names without spaces and in their original format - but this also breaks with the new addresses because the field for State/Region includes an illegal character '/' when trying to edit!
Thanks for the SQL query - I've got that working now. I had assumed you would submit a 'Field Name'.XCT.'Value' style query via your query() function somehow.
grahamdavies commentedon Jul 3, 2014
Hopefully this new release will help:
http://quickbase.intuit.com/developer/knowledge-base/quickbase-release-notes-july-13-2014