Can't figure out an issue when using FilterbyFormula

Topic Labels: API
1709 1
Showing results for 
Search instead for 
Did you mean: 
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:{Part of assembly} = ASB00004_Assembly

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

Thanks for any helpers!


1 Reply 1
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)