Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
charles_mcg
Level I

Query Builder prompt sort order

I've created a Query Builder with a prompt on run, and would like to reverse sort the items in the list.

The prompt doesn't use the SQL order - is there a way to force a descending order in the UI?

4 REPLIES 4
Highlighted

Re: Query Builder prompt sort order

Are you talking about changing the sorting order of the data table? That can be changed by clicking the triangle in the Order By section of the Query Builder.

Capture.JPG

 

Are you talking about a Filter box? That list should be in alphabetical order of the items in that column, but you could always switch the Filter Type to be a manual list and specify the order that you would like.

Capture.JPG

 

Or is there something else that you are trying to do?

Dan Obermiller
Highlighted
charles_mcg
Level I

Re: Query Builder prompt sort order

I'm looking to reverse the sort order in the filter box.

I'm filtering on an experiment number (often notebook-page) so it can't be a static list. Reversing the sort would usually put the newest run at the top, and be more convenient for the users.

I was hoping that maybe there was an optional argument to sort descending that would go in here:

Prompt(
	"BATCH_RUN:",
	Character,
	PromptName( "t1.BATCH_RUN_1" ),
	ValueSource(
		Column( "BATCH_RUN", Alias( "BATCH_RUN" ), Table( "GC_DATA_EXTENDED_VIEW", Schema( "MICROS" ) ) )
	)
)
Highlighted

Re: Query Builder prompt sort order

I'm not a JSL expert or Query Builder expert, so others are probably able to help more than me. However, when you build your query interactively, you can set the sort order as I indicated in my previous post. Doing that generates the JSL that uses Order By. For my specific example, this JSL option is added:

Order By( Column( "LotID", "t2", Order( "Descending" ) ) )

The LotID came from table 2 of the Query. Maybe this will help you.

Dan Obermiller
Highlighted
charles_mcg
Level I

Re: Query Builder prompt sort order

The 'Order By' works on the output table, but not the filter box lists, alas.

Article Labels

    There are no labels assigned to this post.