II would like to create a liquid template that contains all of my fetchXML functions I'll use throughout the portal. I want to include this template on every page and within the page retrieve the values I need for that specific page.
If I were to make a template that contains all of my fetchXML functions and include it on each page, will they all be executed each time? Or are they only executed when I use the xxx.results.entities and assign it to a variable?
Having them all on one page makes it a lot more organized rather then having fetchXML spread out on all my pages.
Solved! Go to Solution.
Hi @bran
The FetchXML only retrieves the data once you invoke the xxx.results.entities
So it shouldn't have any major performance impact having a single Web Template with lots of FetchXML, a few things to have in mind:
Power Apps Portals Super User
Hi @bran
The FetchXML only retrieves the data once you invoke the xxx.results.entities
So it shouldn't have any major performance impact having a single Web Template with lots of FetchXML, a few things to have in mind:
Power Apps Portals Super User
Perfect. I didn't consider the memory aspects of it. It will be a max of maybe 10 or so fetchXML functions on the page. I'm coming from PHP and I'm used to having on my db functions in a consolidated file that I can then pick from when needed. Thanks!
Rather than putting all queries in one template, I would probably break them up into multiple templates and then "Include" the ones I wanted in Liquid e.g. if xxx then include template A else Include template B (can also do switch).
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.