Return defined fields using GeoProcess method submitJob() or execute()

579
0
07-01-2014 07:41 AM
eddiequinlan
Occasional Contributor
Seems like I've been down this road before, but I'll try again.

I am using a Geoprocess spatial query to return user defined fields/columns to the client web browser.  However, what i keep getting returned is all the (75 fields/columns) of the map layer.  I've tried both the submitJob() and execute() methods of the GeoProcess and get the same results.

Here are the two methods:

1.  GP.submitJob(params)  The params are defined by the code below:

var Fields:String = new String("PATPCL_OWNER OWNER HIDDEN NONE;" +
"PATPCL_LGL_ACRE LGL_ACRE VISIBLE NONE;" +
"PATPCL_SALEDT1 SALEDT1 VISIBLE NONE;" +
"PATPCL_ADDR1 PATPCL_ADDR1 HIDDEN NONE")
   
params.polygon = featureSet;
params.Relationship = DropDownMenuSelection;
params.ShowFields = Fields;

Whether i specify the fields to be HIDDEN or VISIBLE, i still get all fields returned.  I know the GP model is working correctly, because I can run the submitJob thru the REST service and the returned job has the correct fields.

It seems to me I am passing the ShowFields parameter incorrectly thru FLEX, or there is some kind of disconnect between FLEX and ESRI with the submitJob() method.

2.  execute(params)

Uses the same params as shown above.  However, since there is no job id returned by this method I cannot check it thru the REST service.  I can only check the returned results thru my FLEX app and I'm finding that all the fields are returned.

I've done alot of researching on the web and apparently others have had the same issue.  Has anyone found a solution?

Sincerely,
Eddie Q.
Tags (2)
0 Kudos
0 Replies