Hi ExBers,
It's been a while since I've been back using ExB, and I see there's a few improvements that have been made.
I have a date field in a hosted table that I have connected up to a text widget. The date is outputting as dd/m/yy so for 24 May 2026 it outputs as 24/5/26. I want it to output as dd/mm/yy though ie 24/05/26. This should be the case for any single digit month to have a 0 in front of it.
I thought it would be as simple as text($feature.fieldname,'dd/mm/yy'), but when I go into Arcade script there's a whole bunch of other stuff going on that I'm not familiar with. Is anyone able to provide some guidance? It doesn't seem to like $feature or $datasource.
This is the default Arcade script.
function getFilteredFeatureSet(ds) {
var result = ds.layer;
var queryParams = ds.queryParams;
if (!IsEmpty(queryParams.where)) {
result = Filter(result, queryParams.where);
}
if (!IsEmpty(queryParams.geometry)) {
result = Intersects(result, queryParams.geometry);
}
return result;
}
// The filteredFeatureSet1 has already been filtered using spatial filters and attribute filters.
// var filteredFeatureSet1 = getFilteredFeatureSet($dataSources["dataSource_2-0"]);
// selectedFeatures1 is the selection view of data source.
// var selectedFeatures1 = $dataSources["dataSource_2-0"].selectedFeatures;
// NOTE: When using selectedFeatures, cases with no selected features must be handled manually.
return {
value: '',
text: {
// size: 14,
// color: 'rgb(0, 0, 255)',
// bold: true,
// italic: false,
// underline: false,
// strike: false
},
};