Select to view content in your preferred language

3 Edit widget questions - Viewer3.3

2023
1
Jump to solution
07-18-2013 12:18 PM
grahamcooke
Occasional Contributor
Hi,

I got a couple of questions on the edit widget functionality i hope someone can help with.

1/ I have a date field as part of my feature class which I create via arc catalog (no date time data type available). Time is enabled on the service in the mxd I have used to publish it as a feature layer. My problem is when I create a new feature to add the database, how do i enter the time in the attribute screen? I only get a date picker with no time capability. It's really important my users can enter time as well as date as their day runs from 4am to 4am rather than midnight to midnight. This makes picking features that are in use on a given date a real pain unless I have a time attribute too!  I can add time to this directly in SQL but if editing the class at run time I am struggling to work out how to do it via the attribute screen.

2/ Is there any way to get default values entered for some of the attributes when I am saving a feature to the database?

3/ Is there an easy way to create a graphic that has been created at runtime via an automated process after users enter some parameters into a feature I can save into the database? I am currently working round this by plotting the graphic and then digitising the feature in the edit widget by using snapping to make sure I have an accurate copy of the graphic polygon. But this is quite clunky!

Would really appreciate some pointers if anyone has any ideas.

thanks
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
grahamcooke
Occasional Contributor
Hi,

Just to update, I got round most of this by creating some custom functionality built into my widget that generates the runtime graphic.

The biggest issue I had, which was converting a graphic to a feature was actually super-simple to get working:


                       var publishingFeatureLayer:FeatureLayer;
//get the feature layer from operational layer added in config file
                        publishingFeatureLayer = map.getLayer("Traces") as FeatureLayer;
//apply edits on feature layer and pass in graphicObject
                        publishingFeatureLayer.applyEdits([ publishedTraceGraphic ], null, null);

View solution in original post

0 Kudos
1 Reply
grahamcooke
Occasional Contributor
Hi,

Just to update, I got round most of this by creating some custom functionality built into my widget that generates the runtime graphic.

The biggest issue I had, which was converting a graphic to a feature was actually super-simple to get working:


                       var publishingFeatureLayer:FeatureLayer;
//get the feature layer from operational layer added in config file
                        publishingFeatureLayer = map.getLayer("Traces") as FeatureLayer;
//apply edits on feature layer and pass in graphicObject
                        publishingFeatureLayer.applyEdits([ publishedTraceGraphic ], null, null);
0 Kudos