map com.testFunction()
{
testMap = map();
testMap.put("str", "String");
testMap.put("num", 123);
testMap.put("bool", true);
//
info isText(testMap.get("str"));
info isNumber(testMap.get("num"));
info isText(testMap.get("bool")) ;
info if(testMap.get("bool") == "true", "Is True", "Is False"); // Mimics a boolean by using "true" in place of true.
//
// This commented statement yields an error when uncommented, showing the value is not a boolean..
// info if(testMap.get("bool") == true, "Is True", "Is False"); // Test for a boolean result of true
// Error at line number : 10 at column 120
// In Criteria left expression is of type STRING and right expression is of type BOOLEAN and the operator == is not valid
//
return testMap;
}
Ultimately I would like to store a "resCode" which would contain a boolean (indicates that the function returns a valid value or not), resMsg, a text string to further describe a failure, and a key/value, which is the primary result. I get these results when I execute this function: