Try this insteadif( val1&&val2){q.where="p_from='"+val1+"' AND p_to='"+val2+"'";}
Can you post what isn't working in your code?
I think if a field value is numeric, you can eliminate the single quotes, could be an issue. Tough to diagnose without looking at the data. How about if you do one query a time, without trying to combine them?
Is that your exact query?This query.where= "field1='"+value1+"'" && "field2='"+value2+"'" is a boolean expression, true or false.Is this the exact code you are using?It should be formed as query.where = "field1='" + value1 + "' AND field2='" + value2 + "'"Try to test it via the Query REST page and see if it works as expected.
Try putting "AND" instead of "&&" in where clause
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.