AnsweredAssumed Answered

Generate conditional connector call inside custom Map Function

Question asked by ch.contzen061487 on Jul 4, 2018
Latest reply on Jul 5, 2018 by ch.contzen061487

Dear all,

 

I'm working in a custom map function creating a Query for an SAP Connector call.

I want this connector call only be made if the generated Query is "valid" null instead of creating a decision shape and do another mapping.

Only if Return is not false (-1) the query should be used for the sap connector call 

(Workaround - use a query returning no result)

 

Possible?

 

Regards,

 

Christian

 

var Input = "Vertrag: 0812345";
var Return = Input.search("Vertrag:");
var KunNr = '000000610006';

if (Return != -1) {
TrueVal = Input.substr(Input.search("Vertrag:")+8,8).trim();
Query = "ParamOne EQ '"+ TrueVal + "' and ParamTwo EQ'" + KunNr.trim() + "'";
console.log(TrueVal);
console.log(Query);
}
else {
Output ="";
FalseVal = "";
Query ="ParamOne EQ '1'";
console.log(Output);
console.log(FalseVal);
console.log(Query);
}

Outcomes