def firstObjWith(pmgr, field, val):
    """ Returns the first objID found where field is value """
    pmgr.updateTables()
    for obj in pmgr.objs.keys():
        if pmgr.objs[obj][field] == val:
            return obj
    return None