When first creating a Perforce repository you don't know the name of the Workspace so you can't define the ViewMap. However, you can use a dummy one then pull the error log to determine what workspace name was generated, then redefine the ViewMap but this is not very intuitive.
Also, once you have the workspace and Validate an error "ViewMap format is invalid" is shown. However if you Save anyway it works. Screenshot attached.