Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Fred12
Contributor III
Contributor III

Create a statut 'ok' and 'ko'

Hello,

I try to create a system with "ok" and "ko".

I got 2 dates and I compare these 2 dates like this : 

= if(NetWorkDays([Commande_sorties_en_tete.Date Création],[Commande_sorties_en_lignes2.Date Heure Dernier Traitement Préparation] )-1 ❤️

, 'OK','ko')

 

It works perfectly, but I would like to have a statut " in preparation" if my  field " Commande_sorties_en_tete.Date Création"  is before today()-2.

Then I tried it, but it didn't work :

= if(NetWorkDays([Commande_sorties_en_tete.Date Création],[Commande_sorties_en_lignes2.Date Heure Dernier Traitement Préparation] )-1 ❤️   and [Commande_sorties_en_tete.Date Création]<today()-2 , 'OK','ko')

 

 

Thanks for reading me

 

Labels (2)
1 Reply
ogster1974
Partner - Master II
Partner - Master II

Sounds like you are looking for records without a preparation date to be in status 'In Preparation' you certainly need to split your condition checks if you want to add another status into the mix.

So perhaps something like:

=if(Len([Commande_sorties_en_lignes2.Date Heure Dernier Traitement Préparation])=0, 'In Preparation',

if(NetWorkDays([Commande_sorties_en_tete.Date Création],[Commande_sorties_en_lignes2.Date Heure Dernier Traitement Préparation] )-1, 'OK','ko')

)