Select to view content in your preferred language

Cannot create a simple feature in Dashboards consisting of multiple records using arcade?

44
0
yesterday
RPGIS
by
Frequent Contributor

Hi,

I am merely trying to create another table within Dashboards using arcade, but I cannot seem to get the feature set to populate using multiple records. I have tested this multiple times, but I am not sure if I need to edit the feature or if there is some other way to go about it.

I would greatly appreciate any help on this.

 

 

var TimeFields = [
    {'name': 'InspectionDate' , 'type':'esriFieldTypeDate' },
    {'name': 'TimeSlot' , 'type':'esriFieldTypeString' , 'Length':10 }
    ]

var TimeSlots = {
  'fields': TimeFields,
  'geometryType': '',
  'features' : []
}

var T = Today()
for( var i= 0 ; i < 24 ; i++ ){
    var V = { 'InspectionDate' : T , 'TimeSlot' : Text( T , 'h:00 A') }
    var F = { geometry : '' , attributes : V }
    Push( TimeSlots.features , F )
    T = DateAdd( T , 1 , 'hours' )
}

console( TimeSlots.features )
var FS = FeatureSet( Text( TimeSlots ) )
return FS

 

 

 

0 Kudos
0 Replies