Implemented get context with dynamic query