How can I add attributes to a feature class?

760
6
Jump to solution
03-05-2018 09:22 AM
Highlighted
Occasional Contributor II

I have a feature layer of points whose only attribute is an ID that matches up to a table of data.  How can I perform a "join" on the client side using the esri javascript api 4.x version so that the attributes from the corresponding table row exist in the feature layer and I can set definition expressions and use the attributes in popups.

Reply
0 Kudos
1 Solution
6 Replies
Highlighted
New Contributor II

This looks amazing.  Thank you so much for the pointer Robert.  I'll give it a shot and post back with my experience.

Reply
0 Kudos
Highlighted
New Contributor II

Do you happen to know where I can find the 'workspaceId' and 'dataSourceName' properties to use in this solution?  I can't seem to find them through the ArcGIS Server Manager.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Jack,

   Sounds like you are unfamiliar with dynamic workspaces.

The table must exist in a registered dynamic workspace in your Map Server.

Enabling dynamic layers on a map service in ArcGIS Desktop—Documentation | ArcGIS Enterprise 

Highlighted
Occasional Contributor II

Ok, this makes sense.  I have registered my sde and I am using the Workspace ID that I created.  Now how can I find the dataSourceName property?  I would assume it would just be the name of the table on our sql server.  But this doesn't seem to be working for me.  Do I need to add anything?  Maybe the schema (dbo.tableName) or something?

Thanks again for all your help.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

Jack,

   This is a example MAP.user1.TaxLots = workspaceid.User.FeatureClassName