How to set a default page when using URL parameters?

I have SPA that uses URL parameters. The URL parameter is the venue and I have several venues, so to access the different venues, the URL parameter is like this

Now, how would I set a default page when the user enters no venue (venue=) or an incorrect venue (venue=5 which does not exist), or some sort of misspelling (venu=2)

Use a ‘Page Load’ workflow, with a condition (when the venue from the URL is empty) to set the URL parameter to whatever default value you want it to be.

Right, but what about wrong URL’s? It fixes the case when the venue parameter is empty but if an incorrect parameter is entered it doesn’t do that.

as long as your Get Data From URL operation is using the correct datatype (i.e. Venue), then an invalid (i.e. wrong) parameter value will not return a valid ‘Thing’, and therefore the condition ‘Get Venue From URL is empty’ will evaluate to true.

If that’s not what’s happening, then I’d guess you’re using ‘text’ as the URL parameter type instead of an actual Thing.

(note: only unique IDs can be used to retrieve Things from a URL parameter directly… so if you’re using the slug instead you’ll have to do a search for the venue based on its slug from the URL. So in that case, the condition should be applied to the search result, not the Get Data From URL itself)

This works… but now for some reason I can’t use any URL parameters as they are defaulted to the “Get Venue From URL is empty” condition as soon as the page loads.