Bonitasoft returns 0.00 in Database for assigned variables


I created 3 variables which i used to do calculations

i called one numberOfNights = Name , Value = numberOfNights type = String, the second one perdiem = Name , Value = perdiem type = String and the last one
is a javascript expression i used for some calculations

Now i used some Javascript function like this :

var CalculateAmount = Number($data.perdiem) * Number($data.numberOfNights);
return CalculateAmount

when i created another variable of Type Javascript Expression with name PerdiemCalculateDays , now i save.

Now i have this as my FormInput which is suppose to hold the Data

  "travelRequestInput" : {
    "departureDate" : null,
    "fullname" : "",
    "hotelNeeded" : false,
    "origin" : "",
    "destination" : "",
    "reason" : "",
    "supervisorName" : "",
    "supervisorEmail" : "",

And formOutput which is supposed to save the Data from the bound values (Variables are bound to the name of the input Widgets numberOfNights, perdiem and PerdiemCalculateDays which I bound to this totlAmount input widget) and all but, inside the Database but instead i get empty columns inside the Database with 0.00 every whre like this


Asides that other things seem to work pretty good , the connectors and workflows are fine.

1 answer


This question is a duplicate one. See the answer on the other question.