UserBird
Dataiker
Dataiker
script in formula in filter query
Problème rencontré lors d'une requête sur un champ string (filtre pour conserver uniquement des dossiers 2017)

slice("sdoss_numdoss",2,4)=="2017"

ou

substring("sdoss_numdoss",2,4)=="2017" (ou substring("sdoss_numdoss",1,4)=="2017" )

message en-dessous : "Formula is valid"



(structure du champ sdoss_numdoss = P201704160494SIA)

résultats --> 0 observation
0 Kudos
4 Replies
cperdigou
Dataiker
Dataiker
You don't need quotation marks around the column name.

Also, you should try without the boolean test to see what the substring outputs.

Anyway, substring(sdoss_numdoss, 1, 5)=="2017" should work.
0 Kudos
thomas_dziedzic
Level 1
i tested but it doesnt work

substring(sdoss_numdoss, 1, 5)=="2017"

and 0 result
0 Kudos
cperdigou
Dataiker
Dataiker
Did you try without the boolean test? See what the substring outputs?
0 Kudos
thomas_dziedzic
Level 1
mistake , last dataset wasnt update and was empty...

substring(sdoss_numdoss, 1, 5)=="2017" works !

thank you
0 Kudos
Labels (1)
A banner prompting to get Dataiku DSS