JQuery-expression-builder icon indicating copy to clipboard operation
JQuery-expression-builder copied to clipboard

setVariables problem

Open CyberDepot opened this issue 4 years ago • 1 comments

hi iuse this code for set variable on run time

let txt_formula_expression = $('#txt_formula').expressionBuilder();
let variables = [
        {
          variableId: 1,
          name: 'FirstName'
        },
        {
          variableId: 2,
          name: 'Age',
          value: 25
        }
]

txt_formula_expression.setVariables(variables)

when i type variable name list is showing the variable name but give error variable not defind!

i need use setVariables because i have on input event and recived variable name from user input

whats the problem?

CyberDepot avatar Nov 14 '22 09:11 CyberDepot

i solved the problem

in this line

var parser = function (expression, options) {

i change with this line

var parser = function (expression, inputOptions) {

CyberDepot avatar Nov 14 '22 10:11 CyberDepot