INVALID_PREDICATE_ENUM_VALUE - can't filter budgets from BudgetService

61 views
Skip to first unread message

rentca...@gmail.com

unread,
Sep 22, 2016, 2:46:01 PM9/22/16
to AdWords API Forum
         Dim service As BudgetService = CType(User.GetService(AdWordsService.v201607.BudgetService), BudgetService)
        Dim selector As New Selector

        selector.fields = New String() {
           Budget.Fields.BudgetId, Budget.Fields.Amount
        }

        selector.predicates = New Predicate() {
            Predicate.Equals(Budget.Fields.BudgetStatus, BudgetBudgetStatus.ENABLED)
        }

        selector.paging = Paging.Default

        Dim page As BudgetPage
        Try

            ' Get the text ads.
            page = service.get(selector)

error: INVALID_PREDICATE_ENUM_VALUE, trigger: '0'


How can the enum have an invalid value?  Is the BudgetBudgetStatus ENUM not the correct enum for filtering BudgetStatus?  


Shwetha Vastrad (AdWords API Team)

unread,
Sep 22, 2016, 5:04:09 PM9/22/16
to AdWords API Forum
Hi,

Could you change the predicate to the one below and retry the request?
  • Predicate.Equals(Budget.Fields.BudgetStatus, BudgetBudgetStatus.ENABLED.ToString())
The service expects the enum value to be a string. Let me know if this works. 

Thanks,
Shwetha, AdWords API Team.
Message has been deleted

rentca...@gmail.com

unread,
Sep 22, 2016, 5:25:45 PM9/22/16
to AdWords API Forum
Oh this works too.  
Reply all
Reply to author
Forward
0 new messages