cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Can't understand why service is asking for datashape for output?

GAjey
10-Marble

Can't understand why service is asking for datashape for output?

Hi I'm trying to make one service where I was using following code

service output should be boolean but when service is run it ask for datashape to show output. Please help me to understand this if I'm missing something

 

SERVICE CODE

SERVICE INPUTS

a --> number

b --> number

c--> number

formula --> string

 

 

try{
var formu = formula;
var formulaArray = formu.split("");
var check = formulaArray.forEach(function(value){
if(value === "a"||"b"||"c"||"+"||"-"||"/"||"*"||")"||"("){
return true;
} else{
return false;
}
});
logger.debug("formulaMaker "+ check);
// function evil(fn) {
// return new Function('return ' + fn)();
//}
//var calculation = evil(formula);
result = check;
//
//
//
//
//
}
catch(err){
logger.error(err);
}

 

ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:GAjey)

It might be resolving into an error and you aren't giving a result in the catch.

View solution in original post

1 REPLY 1
PaiChung
22-Sapphire I
(To:GAjey)

It might be resolving into an error and you aren't giving a result in the catch.

Announcements


Top Tags