Retrieve feature attributes uid/dictionary values

482
2
11-27-2023 03:14 PM
patryks
Emerging Contributor

My requirement is to export features attributes to CSV file. In Feature Table widget the dictionary attributes are properly visualized - with dictionary value. In graphic object the attributes contains only uids like:

{
species_id: "b96c54b0-1b79-4a8b-af07-06b60a85b959"
status_id: "d6acca47-4c88-4da1-9e17-8c8b5d54f7f7"
}

How can I access the corresponding dictionary value?

Tags (2)
0 Kudos
2 Replies
ViktorSafar
Frequent Contributor

This is very hard to help, show some code?

Feature/Graphic objects have property "attributes" which then have properties named after the attributes.

eg: 

  • myObject.attributes.name
  • myObject.attributes.address
  • myObject.attributes.GlobalId
  • myObject.attributes.ObjectId
  •  
  •  
0 Kudos
patryks
Emerging Contributor

This is the graphic attributes object I can access in javascript: 

 

{
objectid: 1,
species_id: "b96c54b0-1b79-4a8b-af07-06b60a85b959",
status_id: "d6acca47-4c88-4da1-9e17-8c8b5d54f7f7"
}

 

species_id is coded value that have more that 4k values

patryks_0-1701213167825.png

This is how it is visualized in FeatureTable

patryks_1-1701213243473.png

FeatureTable can access coded/dictionary value of the attribute. Is there a way to access it via js api?

 

0 Kudos