Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Custom API Datasource: TypeError: a.query is not iterable

Answered
Parmod asked on March 22, 2021

Hi Flexmonster,

Getting below console error

Response for field request:

{
"fields": [
{
"uniqueName": "uniqueName",
"type": "string",
"caption": "UniqueName",
"filters": {
"members": true,
"query": false,
"valueQuery": false
}
}
],
"aggregations": {
"any": [
"count",
"distinctcount"
],
"date": [
"count",
"distinctcount",
"min",
"max"
],
"number": [
"sum",
"average",
"count",
"distinctcount",
"min",
"max"
]
},
"filters": {
"date": {
"members": true,
"query": [
"equal",
"not_equal",
"after",
"after_equal",
"before",
"before_equal",
"between",
"not_between",
"last",
"current",
"next"
],
"valueQuery": [
"equal",
"not_equal",
"greater",
"greater_equal",
"less",
"less_equal",
"between",
"not_between"
]
},
"number": {
"members": true,
"query": [
"equal",
"not_equal",
"greater",
"greater_equal",
"less",
"less_equal",
"between",
"not_between"
],
"valueQuery": [
"equal",
"not_equal",
"greater",
"greater_equal",
"less",
"less_equal",
"between",
"not_between"
]
},
"string": {
"members": true,
"query": [
"equal",
"not_equal",
"begin",
"not_begin",
"end",
"not_end",
"contain",
"not_contain",
"greater",
"greater_equal",
"less",
"less_equal",
"between",
"not_between"
],
"valueQuery": [
"equal",
"not_equal",
"greater",
"greater_equal",
"less",
"less_equal",
"between",
"not_between"
]
},
"advanced": true
}
}

 
 
Error on browser console:

flexmonster.full.js:formatted:1 TypeError: a.query is not iterable
at b.Cda (flexmonster.full.js:formatted:1)
at b.pG (flexmonster.full.js:formatted:1)
at b.Dq (flexmonster.full.js:formatted:1)
at a.Je (flexmonster.full.js:formatted:1)
at b.Bq (flexmonster.full.js:formatted:1)
at a.<anonymous> (flexmonster.full.js:formatted:1)
at a.Ga (flexmonster.full.js:formatted:43310)
at a.oM (flexmonster.full.js:formatted:46012)
at a.dw (flexmonster.full.js:formatted:46019)
at XMLHttpRequest.xhr.onreadystatechange (flexmonster.full.js:formatted:45990)

5 answers

Public
Parmod March 22, 2021

The workaround is :

{
"uniqueName": "uniqueName",
"type": "string",
"caption": "UniqueName",
"filters": {
"members": true,
"query": [],
"valueQuery": false
}
}
Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster March 22, 2021

Hello,
 
Thank you for reaching out to us. Our team is happy to hear you have found the workaround for this case.
 
Still, we did not manage to reproduce the exception on the latest version of Flexmonster. Please see the JSFiddle we have prepared while trying to duplicate the issue: https://jsfiddle.net/flexmonster/xLuvjht1/. It uses the same response on the fields request as mentioned in your question.
 
It would be useful for our research if you could modify this JSFiddle in the way the problem is reproducible. Also, please let us know what version of the component is used in your case.
 
Our team is looking forward to hearing from you.
 
Best regards,
Illia

Public
Parmod March 22, 2021

Hi Illia Yatsyshyn,

Look like we are using older version.

Regards,
Parmod

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster March 23, 2021

Hello, Parmod,
 
Thank you for your feedback.
 
We recommend updating Flexmonster to the latest version available. You are welcome to see our updating guide for reference: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
 
Please let us know if it helps.
Feel free to reach out in case any further questions arise.
 
Best regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster March 31, 2021

Hello, Parmod,
 
We are reaching out to ask if the latest version works well for you.
 
Feel free to contact us in case any additional questions occur.
 
Regards,
Illia

Please login or Register to Submit Answer