Save Calculated Field result as global variable
-
I have a calculated field that creates a string using text fields (fieldname9, fieldname4, and fieldname5) as input and then encoding the result so that the spaces are replaced with %20, etc. My code works and creates an encoded string (see code below):
(function(){
var transport = ”;
if (fieldname9 != 0) {
transport = ‘aaa Total guests: ‘ + fieldname9 + ‘aaa Pickup location: ‘ + fieldname4 + ‘aaa Destination: ‘ + fieldname5;
}
var encodedTransport = encodeURIComponent(transport);
return encodedTransport;
})();
Two questions:
1. When I reference this calculated field using fieldnameX in another calculated field, I only get shown ’20’. It completely ignores the letters before and after the first 20. How can I fix this?
2. I want to store my result, encodedTransport as a global variable so that I can reference it elsewhere without having to call fieldnameX. How is this done?
Thank you
- You must be logged in to reply to this topic.