FIQL Filtering - Not Equal | Nutanix Community
Skip to main content
Solved

FIQL Filtering - Not Equal

  • April 22, 2020
  • 1 reply
  • 3994 views

Forum|alt.badge.img+1

We make use of a lot of the FIQL filtering in our automation to pare down results from various REST calls. However, it seems that while filtering on things like category_name or category_value work just fine with an ==, they don’t seem to work with an !=.

Is there a way to do an inequality filter, specifically with v3 of the Prism Central API?

Best answer by AntonioG

Hi etr.eric,

 

I consult with a dev guy, he told me you need to do an import in phyton:

 

from fiql_parser import parse_str_to_expression

 

Then :

 

if "string" in category_name

 

and

 

if "string" not in category_name

 

Must work well, please let me know if this helps.

 

Regs

Antonio

 

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

1 reply

AntonioG
Nutanix Employee
Forum|alt.badge.img+4
  • Nutanix Employee
  • 52 replies
  • Answer
  • April 29, 2020

Hi etr.eric,

 

I consult with a dev guy, he told me you need to do an import in phyton:

 

from fiql_parser import parse_str_to_expression

 

Then :

 

if "string" in category_name

 

and

 

if "string" not in category_name

 

Must work well, please let me know if this helps.

 

Regs

Antonio