Preserve Import Mapping in Scripts

Idea created by richardsrussell on Nov 10, 2016

    Here's a simple example of how the "Import Records" command works in a script. Let's say we have 2 tables, A and B. Here are the fields in A:


    TableA Start.jpeg


    Here are the fields in B:


    TableB Start.jpeg


    And here's an "Import Records" step in a script intended to import the former into the latter:


    Import Mapping Start.jpeg


    Now we add a couple of fields to Table A:


    TableA + 2.jpeg


    They're numbered alphabetically ahead of the previous ones, so we move them into position at the top of the field list. But here's how they show up in the script's import-mapping dialog:


    Import Mapping Mid.jpeg


    They're added at the bottom, so they don't screw up the previously established matchups.


    But now suppose we don't add new fields but rather delete one, specifically A13:


    TableA - 1.jpeg


    This causes the script to re-aim some of the Table A fields at different Table B fields:


    Import Mapping End.jpeg


    This is what we referred to in grade school as Not A Good Thing.


    Isn't there some way to wave a warning flag before this happens, the same way we're alerted when getting set to delete a field that it will break a relationship? I don't mean just a generic "This field appears in Script X", I mean a much more specific "YOU BOZO, YOU'LL COMPLETELY SCREW UP THE "IMPORT RECORDS" COMMAND OF ALL THE FIELDS BELOW THIS ONE IN THE FIELD LIST!!!"


    Or, better yet, just make the matchups "sticky", so that deleting a field from the list on the left has no effect at all on the mapping onto the fields at the right. The import-mapping dialog could have something like "<<field missing>>" on the left, where one used to be.