query db on enum error when integer

Options
Hey Guys

I have the below enum configured
[enum.png]
Query All from database where ranking=1[query.png]
Error[error.png]
When I change the enum to text value of P1 then it works fine, seems to not work on integer

Comments

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
    The enums are all strings. So you need to make sure it shows as "text" in the space above and not "integer". If you select the drop-down you will be able to pick "1" and you'll see it turn to text. 

    In a dyanamic setup, you'll want to make sure you cast a number to text before passing to this test. 
  • Riaan Backer
    Options
    Thanks Ray, egg on my face for this school boy error.