Rapport hebdomadaire

Bonjour,

J'aimerais une formule qui me sélectionne les lignes de ma table, du vendredi 00:01 au jeudi 23:59 et l'automatisation s'effectuera le vendredi à 08:00 am.

J'utilise une colonne [Date heures]

Merci d'avance

0 3 113
3 REPLIES 3

In general your template <<START>> expression in the automation could be something like below

SELECT(Table_Name[Key_Column], AND([Date hours]>=DATETIME(CONCATENATE(DATE(NOW()-7)," ","00:01:00")), [Date hours]<=DATETIME(CONCATENATE(DATE(NOW()-1)," ","23:59:00"))))

Please do test well. I think you could be missing records created between 23:59:00 and "00:01:00" if you use these timestamps.

You may want to try the following <<START>> expression something like below instead.

SELECT(Table_Name[Key_Column], AND([Date hours]>DATETIME(CONCATENATE(DATE(NOW()-8)," ","00:00:00")), [Date hours]<=DATETIME(CONCATENATE(DATE(NOW()-1)," ","00:00:00"))))

Please test well for your requirements.

If the table size is very large, you could create a slice based on the above expression to select the necessary rows in that time window and use that slice in template START expression.

Bonsoir et merci pour la réponse.

Le BOT me demande que la formule soit YES/NO ?

"The expression is valid but its result type 'List' is not one of the expected types: Yes/No"

May I know in what kind of bot and where you are using this expression? Please note without much details from you, the suggestion is for the <<START>> expression in the template.

 Use Start expressions in templates - AppSheet Help

If you are having a scheduled bot, and you are using the expression in the "filter condition" setting of the event step then please try a filter expression something like 

AND([Date hours]>=DATETIME(CONCATENATE(DATE(NOW()-7)," ","00:01:00")), [Date hours]<=DATETIME(CONCATENATE(DATE(NOW()-1)," ","23:59:00")))

My request to you to familiarize well with all AppSheet automation features, just in case you have not.

AppSheet automation: The Essentials - AppSheet Help

AppSheet automation: The Components - AppSheet Help

 

 

 

 

 

Top Labels in this Space