Boolean JSON field as a checkbox in a form

Hi guys…

Here’s a really annoying behavior that took me a lot of time already and I hope you guys could help me before I try some “not so elegant” solution… :smiley:
I have to tell that I’m not an AngularJS expert so it could be a little dumb question, but anyway… :slight_smile:

That said, here’s my problem: I have a process that stores some information in a JSON variable. it all works fine except that I have a checkbox that updates a property called “replaced”.

Before saving, the json is quite consistent, showing replaced: true, for example. But when I save it, the property get quoted, transforming it to a string (replaced: “true”).

I created a listener function to the “store” event to log the json value and the variable in the scope ($scole.json_var) is ok, but calling console.log($scope.camForm.variableManager.variableValue(‘json_var’)); brings the quoted value.

What am I missing here ? :sweat:

Hi @fcordova

Could you please provide us with the code of the form to heck where the error is?

Cheers
Tristan

Sure… here it is…
The actual variable name is candidates_json… it’s an array of N members, each one being processed in a subprocess.
In this subprocess, sometimes the user has to inform if the candidate is approved or rejected and, if rejected, if he or she should be replaced by another candidate.

The form is a little big the the relevant parts are the beginning (where I have the script loading the json) and the very botton, where the candidates are listed (although when this situation occurs, only one of them is visible to the user).

PS: I had to change the extension to .txt to be able to upload the file.

Recruit_Form_Triagem.txt (10.7 KB)