I am attempting to replace all spaces with a + in a string. This is so I can create a URL that will work with Google Maps, as all spaces in an address need to be replaced with a +
As there is no Replace string function with the Zoho Creator, I have determined a way to do this by using the getPrefix, getSuffix and contains functions. However there is a problem with the contains function when I try and use a space. Please see my simple example below.
I enter the following in the IDE....
Address_Full=input.Address_1;
if((Address_Full.contains(" ")))
{
Address_Pre=Address_Full.getPrefix(" ");
Address_Suff=Address_Full.getSuffix(" ");
Address_Full=Address_Pre + "+" + Address_Suff;
}
Then unfortunately the space " " in the contains is automatically changed to "" (you will only see this if you change Action and then return)
Address_Full=input.Address_1;
if((Address_Full.contains("")))
{
Address_Pre=Address_Full.getPrefix(" ");
Address_Suff=Address_Full.getSuffix(" ");
Address_Full=Address_Pre + "+" + Address_Suff;
}
Any suggestions on working around the issue, or any suggestions on how I can get the Google Maps URL created?
Glenn.