Linkable External URLs

0
Hello All, Background: I’m working on a form that collects client website addresses (among other things) and then displays the URLs along with the company names of all companies on a publically visible list. The URLs need to be hyperlinks. The problem, the URLs as typed by an applicant (layperson) isn’t in the format that Mendix requires in order for it to be a working hyperlink to an external web address. Mendix seems to require the following: ‘https://www. ‘ for it to recognize it is an external address as opposed to a url to its current domain. Ex, if not formatted correctly, youtube.com would hyperlink to mywebsite.com/youtube.com. The attempted fix: I’ve created a microflow that takes the applicants input url, runs it through several exclusive split if statements and outputs it in the https://www. format mendix likes. Unfortunately, there are a variety of ways an applicant can input their url and rather than trying to cover all the possibilities, I was hoping a module existed out there. Or some mendix ability I’ve overlooked.  The question: Does a module or mendix setting exist that would accomplish my required action? Surely I’m not the first to run into this. 
asked
2 answers
1

Hi Jack,

I would use a java action to valid the given string is a URL and then If it is not a valid URL then I will convert the string to Valid URL via java action.

 

answered
0

I would use a Regex to parse the url. You could use the Community Commons widget to do this.

answered