How to sort a Ref to a Slice?

I have a list of jobs in a Google Sheet that is used by two apps as a Ref for a drop-down list of options. Each app references a Slice of the jobs sheet that is relevant to that app. Staff use a third app to add new jobs to the list, to make sure everything is formatted right, but because AppSheet always adds new rows at the bottom, the added jobs aren’t in any useful order (e.g. numerical by job number), which makes the drop-down Ref lists hard to use.

How can I sort the job sheet rows, either in the Slice or in the Ref? I tried putting a ORDERBY command in the VALIDIF for the Ref, but that made it list all the jobs in the sheet, not just the ones in the Slice anymore.

Solved Solved
0 6 587
1 ACCEPTED SOLUTION

ORDERBY(
  JOB FILTER[JOB_CODE], /*HERE IS WHERE YOU MENTIONED THE TABLE INSTEAD OF THE SLICE*/
  [JOB],
  FALSE
)

View solution in original post

6 REPLIES 6

Maybe you use your table name instead of slice name.
Anyway, post a screenshoot

Nope, still using the slice. Screenshots:


And the relevant Slice:

Never mind, I found a solution: replaced ORDERBY(job_code[job_code], [job], FALSE) with ORDERBY(FILTER(“Job Filter”, TRUE), [job], FALSE) (where Job Filter is the name of the Slice). Seems to do exactly what I needed!

ORDERBY(
  JOB FILTER[JOB_CODE], /*HERE IS WHERE YOU MENTIONED THE TABLE INSTEAD OF THE SLICE*/
  [JOB],
  FALSE
)

Oh sweet, that’s even easier. I didn’t know you could use a slice as the data source for ORDERBY. Thanks!

Sure!
Any Table[Column] expression can be written as Slice[Column]
That’s why I think @Steve uses "Dataset" to refer to it

Top Labels in this Space