Hello,
I am looking for a solution to some advanced formatting in the List widget on ArcGIS Dashboards.
I have a hosted table with dates in one of the data fields. However some do not have dates. Therefore, I want to have those that do not have dates to say "Not Submitted" on the list. My script is running but it is not displaying anything when there is an empty field. Please see my script below.
Solved! Go to Solution.
Use IsEmpty to check whether there are no dates and don't use the return statement in the "if" function.
var empty = $datapoint.Discipline_Review_Due_Date
if(IsEmpty(empty){
empty = "Not Submitted"
}
return {
textColor: '',
backgroundColor: '',
separatorColor:'',
selectionColor: '',
selectionTextColor: '',
attributes: {
dept: empty,
}
}
Use IsEmpty to check whether there are no dates and don't use the return statement in the "if" function.
var empty = $datapoint.Discipline_Review_Due_Date
if(IsEmpty(empty){
empty = "Not Submitted"
}
return {
textColor: '',
backgroundColor: '',
separatorColor:'',
selectionColor: '',
selectionTextColor: '',
attributes: {
dept: empty,
}
}
Thank you so much!! That worked perfectly!