Page 1 of 1

console error on react to lookup changes

Posted: 2021-05-29 20:31
by mdannatt
i know this feature is unsupported BUT has anyone else got the same issue when trying to implement react to lookup changes - using type_id in the dropdown?

Uncaught Error: Syntax error, unrecognized expression: #
at Function.se.error (jquery-3.5.1.min.js:2)
at se.tokenize (jquery-3.5.1.min.js:2)
at se.select (jquery-3.5.1.min.js:2)
at Function.se [as find] (jquery-3.5.1.min.js:2)
at S.fn.init.find (jquery-3.5.1.min.js:2)
at new S.fn.init (jquery-3.5.1.min.js:2)
at S (jquery-3.5.1.min.js:2)
at _0x57f61._0x1af78a.<computed> [as _getField] (AppGiniHelper.min.js:7)
at _0x57f61._0x1af78a.<computed> [as _fade] (AppGiniHelper.min.js:7)
at _0x57f61._0x1af78a.<computed> [as fade] (AppGiniHelper.min.js:7)

Re: console error on react to lookup changes

Posted: 2021-06-04 04:44
by jsetzer
Please check, if you are using just the fieldname (like "fieldname") or a jquery selector (like "#fieldname") instead, when using field functions of AppGiniHelper Javascript Library.

When using functions such as dv.getField('"fieldname") or dv.getFields(["fieldname1", "fieldname2"]) or other field-related functions, you have to pass the field's name without leading hashtag-character. Those functions automagically build the jQuery selector string which may be different per field-type, for example dropdown-fields or date-fields get a different id than normal input fields. When using just the fieldname, AGH JSLIB will resolve the id according to the type.

Hope this helps!