Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

hide and show customs fields based on interval between startdate and end date not match

Oussama Dev
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 18, 2023

Hello, 

i want hide costom fields (city and wilaya) when interval between two date (dateFin and dateDebut) is greater than 20d 

this is my code :

mainscript.sil

lfWatch("dateDebut", {"dateDebut", "dateFin"}, "path/controleDates.sil", {"change"});
lfWatch("dateFin", {"dateFin", "dateDebut"}, "path/controleDates.sil", {"change"});

controleDates.sil

date begin = dateDebut;
date end = dateFin;
interval intervalle = toRawWorkingInterval(end - begin,24);
if(intervalle > "20d"){

lfShow("city");
lfShow("wilaya");
}
else {
lfHide("city");
lfHide("wilaya");
}

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events