createView-Function automatically builds the indexList