parameters: (id, isVisible)
return_statement: return {'success': True,'message': message}
docstring: Changes the tables visibility to either pinned or hidden.
docstring_summary: Changes the tables visibility to either pinned or hidden.
docstring_tokens: Changes the tables visibility to either pinned or hidden .
function: def toggleTableVisibility(id, isVisible):
      """
      Changes the tables visibility to either pinned or hidden.
      """
      table = SavedSearch.objects(id=id).first()
      if not table:
          return {'success': False,
                  'message': "Error finding table. Please refresh and try again"}
      message = table.name+ " is now "
      if isVisible:
          message += "visible"
      else:
          message += "hidden"
      table.isPinned = isVisible
      table.save()
      return {'success': True,'message': message}
function_tokens: def toggleTableVisibility ( id , isVisible ) : table = SavedSearch . objects ( id = id ) . first ( ) if not table : return { 'success' : False , 'message' : "Error finding table. Please refresh and try again" } message = table . name + " is now " if isVisible : message += "visible" else : message += "hidden" table . isPinned = isVisible table . save ( ) return { 'success' : True , 'message' : message }