SLICE - EXPRESSION VS UX

I have created a slice from a table, so it can be filtered by another table fields by the user, but when I type the expression and "test" it, appsheet shows no results for the expression window, even when I select "preview data" shows nothing, so far you would think that expression is wrong, however in the UX view, I can see the data filtered correctly using the current expression and selected fields by user.

So I keep using the UX VIEW with no problem, BUT when I try to use my supposed well filtered slice in a doc template, I get no data in the generated document....

In my expression:

and(
if(isnotblank(Envio Filtro[Cliente_ID]),
in([Cliente_ID],Envio Filtro[Cliente_ID]),TRUE),
if(isnotblank(Envio Filtro[Fecha_ini]),[Fecha Envio]>=any(Envio Filtro[Fecha_Ini]),true),
if(isnotblank(Envio Filtro[Fecha_Fin]),[Fecha Envio]<= any(Envio Filtro[Fecha_fin]),true),
if(isnotblank(Envio Filtro[STATUS]),in([Status],Envio Filtro[STATUS]),true) )

the last condition evaluate the data for the slice, where this field can be the following: PARCIAL, COBRADO, PENDIENTE., I want the slice to show those records with two conditions: PARCIAL, PENDIENTE.

As I said the UX VIEW, shows both conditions met, but in test window, preview data and in the template, does not show data filtered for this conditions, It does show data for ONE condition selected,  but since I have a difference in response from appsheet I dont know how to find my problem with the expression for both my app and template.

This is expression in my template:

<<Start:orderby(select(Slice Envio Filtro[ID],true),[Fecha Envio])>>

I hope I've made my self clear

thanks

0 2 108
2 REPLIES 2

Steve
Platinum 5
Platinum 5

If the template is part of a scheduled bot, keep in mind that scheduled bots run as the owner of the app. This may be an issue if your security filters, slices, or templates make any decisions based on the current user.

Hello Steve, yes ,it is a bot that runs when you push a button, to create a report (doc template); also it is enable to bypass security filters.
I cannot create a report where it shows the two conditions selected by user, my guess is in the IN() function,
 in([Status],Envio Filtro[STATUS] 

[Status],Here every record has is it own condition, one

Envio Filtro[STATUS] ,this can be one to three conditions (COBRADO, PARCIAL, PENDIENTE), when user selects one, works, but when is selected two conditions, it becames a list...and there is the problem, but it is supose to be a list, so I dont know what is not woking...

I even create a column to help me verify the results.

DanielGT_0-1743629077317.png

on the left you can see column HELP, on the right you can see the slice, but when user select STATUS (on the left), the slice shows the records filtered correctly, but in the HELP column (with the same expressions as the slice) the records are not the same.

DanielGT_1-1743629427158.png

 

Top Labels in this Space