Subscribe Bookmark RSS Feed

data filter favorites --can I use "not equal" in where clause?

jmpbeginner

Community Trekker

Joined:

Sep 11, 2013

I am trying to define a filter favorite that will scale as new data is added to my table:

<!--

Favorites(

  "Test_Favorite1"(Match( columns( :type, :name, :batchID ),

  Where( :type == "PM" ),

  Where( :name == "Weekly" ),

  Where( :batchID == {266, 268, 290} )

  ))

)

-->

I would like to be able to specify what batchIDs to NOT include in the filter, that way as new batchIDs show up my filter will include them (but exclude the problem batchIDs that I have previously identified to exclude).  When I try to use the != operand, I get errors..  I also tried !== as well with no luck.

//example (include ALL batchIDs except for 268):

<!--

Favorites(

  "Test_Favorite1"(Match( columns( :type, :name, :batchID ),

  Where( :type == "PM" ),

  Where( :name == "Weekly" ),

  Where( :batchID != {268} )

  ))

)

-->

I don't see anything in the manuals/scripting guide.. is this possible?

4 REPLIES
mwechtal

Community Trekker

Joined:

Jan 19, 2012

I would try:

Where( not(:batchID == {268}) )

I've had other situations where the != operator didn't work, and this seems to get around that.

jmpbeginner

Community Trekker

Joined:

Sep 11, 2013

dang, no luck:

"The WHERE clause has not been correctly specified. in access or evaluation of 'Not' , !/*###*/(:experiment_id == {303, 322})"

i tried this:

<!--

  Favorites(

  "Test_Favorite1"(Match( columns( :type, :name, :batchID),

  Where( :type == "PM" ),

  Where( :name == "Weekly" ),

  Where( Not( :batchID == {303, 322} ) )

  ))

  )

-->

maybe I need to select all batchID's first, then the Where(NOT()) will work??  Is there a way to select all batchID's on launch without calling out a static list of batchID numbers?

thanks

mwechtal

Community Trekker

Joined:

Jan 19, 2012

Hmm, I'm stumped. You might have to go to a Script to do that.

M_Anderson

Staff

Joined:

Nov 21, 2014

Try this:


Favorites(

"Test_Favorite1"(Match( columns( :type, :name, :batchID ),

Where( :type == {"<Not PM Entry 1>","<Not PM Entry 2>","<Not PM Entry 3...>"} ),

Where( :name == {"<Not Name Entry 1>","<Not Name Entry 2>","<Not Name Entry 3...>"} ),

Where( :batchID == {303, 322} )

)),

Inverse( 1 )

);


You'll have to fill in the missing type and name entries, but this should do the exclusion of the specific batchID's.  If that doesn't do what you're after, I'd recommend that you send a note to tech support (support@jmp.com).  They have some really good scripters on the team that have helped me out in the past.  Also if its something that JMP can't do, they can route the question to the developers to see if it can be fixed in a future issue of JMP.

Best,

M