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! Go to Solution.
AND([PreBookedDateNoTime] <= TODAY(), [JobStatus] = โAUTHORISEDโ, [JobType]<>โMechanicalโ,ISNOTBLANK([PreBookedDateNoTime]))
Try doing a save & verify. Sometimes the display is wrong when youโve just changed or created the formula
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
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?
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.
User | Count |
---|---|
43 | |
34 | |
27 | |
23 | |
15 |