Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to insert previous value of (DATE_FIN) in the blank of DATE_DEB and DATE_FIN.
I try this expression and it doesn't work:
if(MATRICULE=previous(MATRICULE)and MOTIF<>Previous(MOTIF) and IsNull(DATE_DEB) and IsNull(DATE_FIN),Previous(date(DATE_FIN,'DD/MM/YYYY')),0) as DATE_DEB
you find in attached my test case.
Thanks for helping.
try this:
test :
LOAD * INLINE [
MATRICULE, NOM,MOTIF ,DATE_DEB, DATE_FIN,
1, DUPOND, RECRUTEMENT, 15/06/2015,17/08/2017
1, DUPOND, AVANCEMENT, 18/08/2017,31/01/2018
1, DUPOND, 'FIN CONTRAT','' , ''
];
test2:
LOAD RowNo() as id,
NOM,
MATRICULE,
MOTIF,
if(len(Trim(DATE_DEB))=0,Previous(DATE_FIN),DATE_DEB) as DATE_DEB,
if(len(Trim(DATE_FIN))=0,Previous(DATE_FIN),DATE_FIN) as DATE_FIN
RESIDENT test
order by MATRICULE;
DROP Table test;
Hi,
You can't do it on the front end using a table box, you should use a straight table.
is it ok for you ?
Hello Youssef,
I do it in my script I have attached my script .
try this:
test :
LOAD * INLINE [
MATRICULE, NOM,MOTIF ,DATE_DEB, DATE_FIN,
1, DUPOND, RECRUTEMENT, 15/06/2015,17/08/2017
1, DUPOND, AVANCEMENT, 18/08/2017,31/01/2018
1, DUPOND, 'FIN CONTRAT','' , ''
];
test2:
LOAD RowNo() as id,
NOM,
MATRICULE,
MOTIF,
if(len(Trim(DATE_DEB))=0,Previous(DATE_FIN),DATE_DEB) as DATE_DEB,
if(len(Trim(DATE_FIN))=0,Previous(DATE_FIN),DATE_FIN) as DATE_FIN
RESIDENT test
order by MATRICULE;
DROP Table test;