If you have several views, create a function that returns the correct XPage so that you maintain the logic in one place.
Also, if the naming is consistent with your example:
// in function
return '/x' + currentDocument.getValue( 'Form' ).toUpperCase() + '.xsp'