Slice doesn't work in View

I’ve created a slice “NotInProgress” which on testing returns the correct data I asked it to do, in this case there are two rows to return:

AND([PreBookedDateNoTime] <= TODAY(), [JobStatus] = “AUTHORISED”, [JobType]<>“Mechanical”)

When I create a view using the Slice it doesn’t work and returns far too many rows and not the data from the slice.

I’m stumped as to why?
.

Solved Solved
0 13 736
  • UX
1 ACCEPTED SOLUTION

AND([PreBookedDateNoTime] <= TODAY(), [JobStatus] = “AUTHORISED”, [JobType]<>“Mechanical”,ISNOTBLANK([PreBookedDateNoTime]))

View solution in original post

13 REPLIES 13

Try doing a save & verify. Sometimes the display is wrong when you’ve just changed or created the formula

Simon@1minManager.com

Hi Simon, thats been done several times.
There are other views using slices in the App and no issues, it’s just this one…

Try each of the AND() sections in turn to confirm each works as expected. I’ve sometimes had issues with ones like

[JobType]<>“Mechanical”

and had to use

NOT([JobType]=“Mechanical”)

instead

Steve
Platinum 4
Platinum 4

The view has nothing to do with the problem; the problem is the slice. In Data >> Slices, click Show Data for the slice. Using that, can you see any pattern to the unexpected rows?

Hi Steve
AND([PreBookedDateNoTime] <= TODAY(), [JobStatus] = “AUTHORISED”, [JobType]<>“Mechanical”)
Returned the correct data from the table filtered from the expression, there were no errors or enexpected rows. This was done and tested before I created the view knowing the data reurned was correct.
It is only when the view was created and the slice selected as the view data that too many rows of data are shown.

As it currently stands, the Slice returns nothing, and that is correct because all of our records are up to date and nothing in the table matches the expression so I would expect the view to show nothing either. But below is what it returns whic isn’t right:

This?

3X_5_2_52b5578631b77c8717ebe40adf5c3c33fb44d088.png

3X_4_b_4b69100149ae34e1fd53a21afe78bc14863ebc34.png

I think I’ve found it, the view is showing cases where [PrebookedDateNoTime] = Blank as well as <=.
So what do I need to add to the expression?

NotIsBlank ?

AND([PreBookedDateNoTime] <= TODAY(), [JobStatus] = “AUTHORISED”, [JobType]<>“Mechanical”)

(Very strange though the slice itself ‘View Data’ returns something completely different)

Similar issue in this other thread: New Bug Encountered: Editor emulator not respecting Slice ShowIF -- but App and alternate preview wo...

The various layers of AppSheet do have some inconsistencies. Handling of blank values is one of the biggest.

Any time there is a chance a column value might be blank, your expression should consider that explicitly.

AND([PreBookedDateNoTime] <= TODAY(), [JobStatus] = “AUTHORISED”, [JobType]<>“Mechanical”,ISNOTBLANK([PreBookedDateNoTime]))

Could [JobStatus] and/or [JobType] also be blank?

Never Steve, the data is pulled from our management database and there is always a default value in those fields.

yeah, sorry. This is one of the nasty inconsistencies in the expression system, as Steve points out. We hope to change this soon, but have to do it in a way that doesn’t break existing apps.

Top Labels in this Space