Hello everyone, I've been trying to query the service table via Javascript, but i don't get any records.
I've tried lots of querys and giving admin access to the webApp user, but nothing appears in the debugging page
Any solution? Thank you in advance
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Hello @Heku_ ,
i have never used select all tbh. You can print result with JSON.Stringify(). Can you skip that selectAll?. Have you tried something like:
var res = query.ExecuteQuery();
var services= res.getElementsByTagName("service");
logInfo(services.length);
logInfo(JSON.Stringify(services));
Do you have admin rights? Have you run the web app in admin mode? You can escalate admin rights for the query when you do not want to give admin rights to web app user.
Marcel Szimonisz
Views
Replies
Total Likes
Hi @Heku_
In the <select> tag you aren't defining any <node> to select for the querydef. You can try giving nodes inside the select to get the results. Nodes are the parameters you want to query/get using the querydef function.
Example:-
Hope this helps.
Regards
Akshay
Views
Replies
Total Likes
No, SelectAll adds all fields on the select part, so node isn't needed. I've tried it anyway but it didn't work...
Hi @Heku_
Also your logs will not be visible in the debug mode, you can see your logs under Home>>Monitoring >> web@default >> Open log journal . There you can sort based on the dates and you will be able to see your lgs for webapps.
Regards
Akshay
Views
Replies
Total Likes
Error can be seen in debug mode
Hi @Heku_
Could you please parsing the XML object to string using "toString()" funtion and then try to log Error and let me know if this works.
Regards
Akshay
Views
Replies
Total Likes
Same result as logError(result), empty error...
Hello @Heku_ ,
i have never used select all tbh. You can print result with JSON.Stringify(). Can you skip that selectAll?. Have you tried something like:
var res = query.ExecuteQuery();
var services= res.getElementsByTagName("service");
logInfo(services.length);
logInfo(JSON.Stringify(services));
Do you have admin rights? Have you run the web app in admin mode? You can escalate admin rights for the query when you do not want to give admin rights to web app user.
Marcel Szimonisz
Views
Replies
Total Likes
Hi @Heku_.,
Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!
Views
Replies
Total Likes