Esri / data-assistant

ArcGIS Pro Add-in that assists in emergency management, local government and state government data aggregation workflows.
Apache License 2.0
23 stars 8 forks source link

Ignore field case #113

Closed MikeMillerGIS closed 7 years ago

MikeMillerGIS commented 7 years ago

@SteveGrise I have found that when I switch databases, which may force a case change, the field calculator part of DA fails.

Can we add the following function and replace all names.index() with it? I tested this and it works nicely

def getFieldIndexList(values,value):
    for idx, val in enumerate(values):
        if val.upper() == value.upper():
            return idx
SteveGrise commented 7 years ago

Yes, that is a good thing to fix.

On Mon, Feb 6, 2017 at 4:19 PM, Michael Miller notifications@github.com wrote:

@SteveGrise https://github.com/SteveGrise I have found that when I switch databases, which may force a case change, the field calculator part of DA fails.

Can we add the following function and replace all names.index() with it? I tested this and it works nicely

def getFieldIndexList(values,value): for idx, val in enumerate(values): if val.upper() == value.upper(): return idx

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Esri/data-assistant/issues/113, or mute the thread https://github.com/notifications/unsubscribe-auth/AEh3BI0PRKajPYKSMb7MCezDUdnhsj-Oks5rZ45GgaJpZM4L4uxU .

MikeMillerGIS commented 7 years ago

pr pushed against correct branch.

MikeMillerGIS commented 7 years ago

resolved, thanks!