call functions with context, if no view get all docs