Select to view content in your preferred language

Identify Widget 3.3 - restrict the list of fields

825
6
Jump to solution
06-24-2013 11:14 AM
StewartGalloway
Occasional Contributor
How do I restrict the list of fields in the results window?  I specified 3 fields in the IdentifyWidget.xml but the results show all fields. 
Viewer for Flex (Application Builder) ver 3.3. 
I installed the widget using App Builder.
Thanks.
Stew
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Notable Contributor
Stew,

I know that you can have the best of "both" worlds, but know there are limitation as to what the app builder can do, especially for custom widgets
and configuring.
I know that you can add widgets with limited config capabilites that can be fully configed once "outside" of app builder.

The one thing that I would check and make sure is that if you make a change to the xml, then "re-configure" that widget in app builder, I would make sure that the changes you made outside of app builder are not getting re-set by app builder.

One thing I find handy is to load the xml directly into the browser  http : //yourservername.com/flexviewer/widgets/identify/identifywidget.xml .

This will show you in the browser the "current" file on the server that is being loaded for the config.  Make sure you see the changes here, then it's just a matter of configuring correctly.

R_

View solution in original post

0 Kudos
6 Replies
RhettZufelt
MVP Notable Contributor
Don't think the App Builder will let you configure that (not sure though). However, in the xml you attached, you should be able to change this line to get what you are after:

 <layers onlythese="true">


That way, it will only list the layers/fields you have listed in the confg file.

R_
0 Kudos
StewartGalloway
Occasional Contributor
Rhett,
Thanks for the help but I still can't get the restricted list.   None of the new code shows up in Configure window yet the widget works in that I can click on a layer and get results.
Do I have to do anything with the swf file after I have made edits to the config.xml?  Does App Builder compile it?
thanks.
Stew
0 Kudos
RhettZufelt
MVP Notable Contributor
Stewart,

I don't use app builder, so I'm not sure.  I believe app builder only works with compiled apps, so it shouldn't be re-compiling it for you, especially with only .xml changes.

Not sure if app builder will re-write the xml file every time you configure, but know there are certain configs that you can't do within the app builder.

However, if I change the xml(s) on my server (for that FV app) for a widget, the changes are reflected the next time I do a clean load into the browser (can do this with any text editor, so is independant of the "build").  So, you should be able to make the config changes on your server folder and have them take effect.  Not sure, however, if app builder will "remove" your customizations if you open/configure that widget again or not.  You would have to test.

With the identifywidget, I find it much easier to just put ONE layer in there and get it configured so that it is reporting as you want, then I add my other layers to the xml.

R_
0 Kudos
StewartGalloway
Occasional Contributor
Rhett,
From what i've been reading it looked like I could have the best of both (simple) worlds: out-of-the-box stuff via App Builder and also custom widgets from gurus like Scheitlin (which includes edits to the config.xml).
Good idea, I will start with only one layer.
thanks.
stew
0 Kudos
RhettZufelt
MVP Notable Contributor
Stew,

I know that you can have the best of "both" worlds, but know there are limitation as to what the app builder can do, especially for custom widgets
and configuring.
I know that you can add widgets with limited config capabilites that can be fully configed once "outside" of app builder.

The one thing that I would check and make sure is that if you make a change to the xml, then "re-configure" that widget in app builder, I would make sure that the changes you made outside of app builder are not getting re-set by app builder.

One thing I find handy is to load the xml directly into the browser  http : //yourservername.com/flexviewer/widgets/identify/identifywidget.xml .

This will show you in the browser the "current" file on the server that is being loaded for the config.  Make sure you see the changes here, then it's just a matter of configuring correctly.

R_
0 Kudos
StewartGalloway
Occasional Contributor
Thanks very much. I will try it.
0 Kudos