Odk-x survey stops when trying to implement double metaphone function

have downloaded the js. library from npm ( https://github.com/words/double-metaphone ) into the ODK-X folder app/system/libs.
How do I reference the variables in my form to effect the changes?

var doublemetaphone = require(‘double-metaphone’)
var fname = doublemetaphone(firstname)
I want the algorithm to effect on the sqllite database on my phone(variable:firstname)
When I open odk-survey it stops working

Any help please

The system folder is controlled by the Survey and Tables APKS. The ODK-X system will overwrite the system folder as it needs to maintain the JavaScript to Java interface to access all the system features.

A recent discussion on importing libraries into Survey in this thread:

1 Like