Is there a way to have the filed maps to populate based on a table selected by the user? I am trying to create ta model that can be used to append different tables in to different SDE tables layers. Using the delete features of the SDE layer and copy features to the table by append. I need the Field Maps to populate based on the input table selected at run time, to give the options to add the field map from that table.
Any help would be appreciated
Thanks,
Donna.
This wouldn't be possible using the out-of-the-box tools available to ModelBuilder. I would think that you'd need to build a custom script tool accomplish this. Pythonaddins have the ability to get the selected layer from the TOC. I believe you may be able to leverage this in your script tool, but you would need to programmatically create the fieldmappings object needed for your tool and provide logic to handle when the user doesn't select anything or has multiple layers selected.
Is there a reason why you'd want to take this approach instead of just having the user select the needed layer within the parameters of your tool?