Robert,
So I have been able to get result that i am looking for, however it is being applied to all the layers within my query widget. I have both parcels and address points being used in my query widget When i go to export out address points results as a CSV the results will only list the "PIN" field. Which in my address point data is not a valid field.
layer.fields = ["PIN"]
featureSet.fields = lang.clone(layer.fields);
Is there a way that i can call the Layer's popup configuration from the web map as the fields that should be exported? So instead of doing the above code, limit the featureSet.fields to the web map popup that is specified in the query configuration dialogue box?