'How to add more than 2 filters in search_filter of Salesforce Marketing Cloud Fuel SDK - Python
How can I append more than 2 filters in the search_filter of FuelSDK - Python which I am using to access Salesforce Marketing Cloud?
Lets say there are 3 filters:
name_filter = {'Property' : 'Name','SimpleOperator' : 'equals','Value' : name}
age_filter = {'Property' : 'Age','SimpleOperator' : 'equals','Value' : age}
country_filter = {'Property' : 'Country','SimpleOperator' : 'equals','Value' : country}
Now here in the search_filter how to include all the above three filters since there are only two options i.e LeftOperand and RightOperand? If using FuelSdk it's not possible then what is the other way I could do the same?
row = ET_Client.ET_DataExtension_Row()
row.auth_stub = stubObj
row.CustomerKey = customerKey
row.search_filter = {'LeftOperand': name_filter, 'LogicalOperator':'AND', 'RightOperand':age_filter}
PS: I also tried nesting these filters but that also didn't worked. For Example:
name_filter = {'Property' : 'Name','SimpleOperator' : 'equals','Value' : name}
age_filter = {'Property' : 'Age','SimpleOperator' : 'equals','Value' : age}
country_filter = {'Property' : 'Country','SimpleOperator' : 'equals','Value' : country}
complex_filter1={'LeftOperand': name_filter, 'LogicalOperator':'AND', 'RightOperand':age_filter}
complex_filter2={'LeftOperand': complex_filter1, 'LogicalOperator':'AND', 'RightOperand':country_filter}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
