Help

Re: Can't figure out an issue when using FilterbyFormula

705 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Guy_Galonska
4 - Data Explorer
4 - Data Explorer

I’m using this code:
item_call = at.get(‘Master reference’, input_item)
Assembly_name = item_call[‘fields’][‘Assembly name’]
Assembly_bom = at.get(‘BOM’, filter_by_formula="{Part of assembly} = %s" % Assembly_name)
print json.dumps(Assembly_bom, indent=4, sort_keys=True)

I’m getting a 422 error, but can’t really figure out whats going on. Also, the same code seemed to work a few hours ago.
the 422 error url is:
https://api.airtable.com/v0/xxx/BOM?filterByFormula={Part of assembly} = ASB00004_Assembly

It’s important to say that {Part of assembly} is a linked field.

Thanks for any helpers!

Guy

1 Reply 1
Guy_Galonska
4 - Data Explorer
4 - Data Explorer

Nevermind. Solved!

Should look like this:
Assembly_bom = at.get(‘BOM’, filter_by_formula=’{Part of assembly} ="%s"’ % Assembly_name)