You can then have a button with the script step:
Set Web Viewer
Enter the Object Name (this is the Name of the webviewer you'd need to enter in the Inspector)
Set the Action to Go to URL...
and specify the custom address as specified in my previous post.
Thanks again Phil. It worked perfectly!!!
Can what you've explained above work also as an OR function. I'll explain :)
I can use
"https://maps.google.com/maps?saddr=" & maintable::POSTCODE & "&daddr=" & maintable::POSTCODE2 & "&hl=en"
And it works.
But sometimes there is only an "x" in maintable::POSTCODE2 and I need to manually enter in maintable::POSTCODE3 full address details into maintable::POSTCODE2 or change the code each time by editing the web viewer, which is not ideal.
My question is this:
Can I make a line of code like above for google maps viewer that says IF maintable::POSTCODE2 = "x" then use maintable::POSTCODE3
I think that it's not possible but it would save me working out a work around unnecessarily.
You should just be able to put an If statement into the calculation:
"https://maps.google.com/maps?saddr=" & maintable::POSTCODE & "&daddr=" & If ( maintable::POSTCODE2 = "X" ; maintable::POSTCODE3 ; maintable::POSTCODE2 ) & "&hl=en"I haven't tested it, but I don't see why it wouldn't work.
Thanks, I just tried it and it works 100%!
How do you get it to work in FM Go?