Hello, I have some data that I need from some specific dataverse tables.
Problem is I need to query a table to get some data and use that data to query other tables.
Is there any way to do that? If I normally use FetchXML, all of them run an the same time, I can not use the result of one in another, or at least I don't know how.
I thought maybe something with JS, if possible.
Thank you.
Thanks @OliverRodrigues, had no idea about the API, it's exactly what I need, I thought the only way to get data is through FetchXML.
Why not using the Portals API?
On the click/select of each record you run the additional queries.
Does that make sense?
Hi @chleverenz , I don't know if I explained correctly.
I have multiple queries, all of them get executed at the same time, so I don't have any results to start with.
My first query returns some data, I need some of that data to execute the second query.
Have read both your links, I don't seem to understand the solution.
Can I have more details?
Now the site is slow, one query has 7000+ results. I save the data to a JS variable and use the data from the other queries to filter out the one with 7000+ and get the data I need. As I said, site is so slow, takes 1-2 mins to load, sometimes even crashes.
Hi @sweb ,
in case of that kind of requirements, i create a liquid template which uses fetchxml to make the queries. Either you make several "services" out of that or you create a bigger template with several fetches. Never tried but i think, you can use results of a fetch in the next fetch.
https://learn.microsoft.com/en-us/power-pages/configure/liquid/template-tags#fetchxml
For the parameter you can just use request.params.<whateveryouparameteris>
https://learn.microsoft.com/en-us/power-pages/configure/liquid/liquid-objects#request
When creating that kind of things, just create a liquid (=web) template, assign it to a pagetemplate and IMPORTANT: swicth off "render header and footer" and then create a page with that pagetemplate. The liquid will be renderered as it is and you can create for example a jsonoutput.
Hope this points in the right direction,
Christian
Fubar
69
Super User 2025 Season 1
oliver.rodrigues
49
Most Valuable Professional
Jon Unzueta
43