Here is a scenario about the requirement :
I have two user entries field First Name & Last Name followed by a scripted field to call the website address in below mentioned format:
www.firstnamelastname.com
However there are cases where either first or last name includes a space or has more one name.
John Davis Michael.
Where John Davis is their first name and Michael is their last name.
For above scenarios the website display results as www.john davismichael.com ( with an additional between john & davis)
How can I remove this space using scripting ?
Solution : You could use a VB script by using a replace function to remove any spaces in the first or last name field when you use it in the website field. The script would look something like this:
replace(firstname," ","") & replace(lastname," ","")
Considering the fact you have two user entry fields i.e. firstname & last name, the final script to display the website(as per above scenario) would be something like this:
ifs(firstname<>"" and lastname<>"", "www." & replace(Lower(firstName)," ","") & replace(Lower(lastname)," ","") & ".com","")
Please Note: Lower() tag is used to keep the letters within website in lowercase format.