Select to view content in your preferred language

Function to grab the selection from another widget

3943
25
Jump to solution
05-24-2018 10:32 AM
MartinOwens1
Frequent Contributor

I've created a feature action in eSearch that can open another widget and send the selected featureSet, but I'm having trouble retrieving the selection from the other widget. I'm trying to use the selection from the eSearch wiget as an input for the results of another widget. Any help would be great!

0 Kudos
25 Replies
RobertScheitlin__GISP
MVP Emeritus

Martin,

   Very likely. The fields in that config need to be fields that exist in the eSearch widget result layer.

0 Kudos
MartinOwens1
Frequent Contributor

The thing is they are. They derive from the same original feature layer. I've even narrowed the config to just one field with no luck.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Martin,

  So now you need to debug the construct table function then placing a breakpoint in the code to inspect the objects.

0 Kudos
MartinOwens1
Frequent Contributor

So here's what I've learned. If the this.reportFeatures = (addressPtsLayer) from the getFeatures function the _constructTable function never even gets called, and there are no object. If I set it to the addressPtsLayer.graphics it finds the objects begins to build the array of fields from the config, but the [field.fieldName] is undefined. If I assign it to a particular field name such as [PARID] it builds, but obviously assigns the parid to ever field in the array.

Using addressPtsLayer.graphics as reportFeaturesField Undefined

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Martin,

   So you said that the fields in the eSearch result layer are the same as what is the _this.config.pdfReportFields have you actually verified this? Just because they are based on the same layer the eSearch result layer will not have a field if you did not configure that field to be visible in the results.

0 Kudos
MartinOwens1
Frequent Contributor

That's it! The eSeach config was missing a couple of field definitions that are in the Feature Service! Thanks so much Robert!

0 Kudos