Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a second field to the result of Find widget #213

Closed
MesquiteGIS opened this issue Sep 16, 2014 · 9 comments
Closed

Adding a second field to the result of Find widget #213

MesquiteGIS opened this issue Sep 16, 2014 · 9 comments

Comments

@MesquiteGIS
Copy link

I'm wondering if it is possible to add a second field to the results of the Find widget. That is when a result is found using the find query, the results window displays two fields, say Parcel ID and Address, rather than just one.

Thanks!

@friendde
Copy link
Contributor

Yes you can I think its buried in Find.js (note uppercase F). Im on my phone now but I will post a better response tommorow, unless @tmcgee beats me to it. ;)

@tmcgee
Copy link
Member

tmcgee commented Sep 17, 2014

Hello Mesquite,

The ESRI's FindTask used by the Find Widget works across multiple layers and fields and so the response only returns 3 fields:

  • layer
  • field
  • value

The response from ESRI's QueryTask can contain any and all fields from a layer. There isn't a CMV widget currently available that works with the QueryTask. I have a pair of widgets completed for a client that do work with the QueryTask and I now have the ok to provide them to CMV. I will be packaging them up for submission to this project.

@MesquiteGIS
Copy link
Author

Okay, thanks. Unless friendde has a work around I'll leave it at that.

Thanks!

@friendde
Copy link
Contributor

Sorry no work around. In a previous version of CMV, only one (or two??) of the above mentioned response results were coded to display. I modified that previously and I was thinking that was your question as well. But since then @tmcgee exposed all of them.

Are you seeing something similar as in my screen shot?

image

@tmcgee tmcgee closed this as completed Sep 18, 2014
@MesquiteGIS
Copy link
Author

Thank you all for your help and comments!

@friendde
Copy link
Contributor

@MesquiteGIS I know now this is not what you were asking, but you can display the third (and final) column which is the field name. That was the piece I was suggesting in response to your post.

By default the third column is hidden. I updated the Wiki, https://github.com/cmv/cmv-app/wiki/Widget-find.js if you want to display it. I also added a note about the default sorting.

@jebu75
Copy link
Collaborator

jebu75 commented Jan 20, 2015

This may be new in the latest version of the api but the FindResult returns the found feature with attributes.

@tmcgee
Copy link
Member

tmcgee commented Jan 20, 2015

Nice! I believe that was added in a recent version of the API. Certainly was not there back at 3.8 or 3.9 when the Find widget was first written.

@MesquiteGIS
Copy link
Author

Thanks,

I'll do some updating.

On Tue, Jan 20, 2015 at 2:27 PM, Tim McGee notifications@github.com wrote:

Nice! I believe that was added in a recent version of the API. Certainly
was not there back at 3.8 or 3.9 when the Find widget was first written.


Reply to this email directly or view it on GitHub
#213 (comment).

Ryan Kammerer, GISP
GIS/Programmer Analyst II
City of Mesquite, Nevada
(702) 346-8647 Ext. 4

Confidentiality Statement:

The information contained in this electronic mail is confidential
information. This information may be attorney/client privileged
and is intended only for the use of the individual or entity named above.

If the reader of this message is not the intended recipient, you are hereby
notified that any dissemination, distribution, copying, or re-transmission
of this message is in violation of 18 U.S.C. 2511(1) of the ECPA and is strictly
prohibited. If you have received the message in error, please notify the
sender immediately. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants