Custom Order for Field Picker

Knowledge Drop

Last tested: Dec 14, 2018

By default, the Field Picker is sorted alphabetically.

Workaround: If you add spaces to the label of a dimension, then you can change where it will appear in the field picker. Additionally, the leading spaces are stripped from the UI, so it won't look ugly to your consumers.

Example:

dimension: aardvark {

# A dimension with a name like this will usually come first in the field picker.

}

dimension: beta {

label: " beta"

# With a space in the label, "beta" will come before "aardvark!"

}

dimension: camel {

label: " camel"

# With two spaces in the label, "camel" will come before "beta"!

}

 

This content is subject to limited support.                

Comments
lambdamusic
Bronze 4
Bronze 4

This is a nice workaround but it doesn’t solve the main problem of being able to provide custom orderings of the fields. 

I wish there was a way to say ‘use the ordering from the view LookML code’, as opposed to the alpha ordering...

felixhelix
New Member

Seconding this - when importing a view from an existing table, the order of the fields should be the same as the existing table. There are many use cases when alphabetical makes things very messy. I’ve encountered this multiple times in my work.

Version history
Last update:
‎05-07-2021 09:09 AM
Updated by: