Fetch Collection on workflow or on initialisation!

Hello,

Here is the loading log of my page, I see that after loading the current date, my Reunions, Courses, Horses collections are Fetched, then Data Fetched, then, I launch my workflow: LoadReunionsCoursesHorses, which loads my variables to obtain the desired values ​​for my collections.
I have the impression that my collections are loaded twice, which is one time too many! How can I avoid this please?

Loading page data...21:57:33
Initializing plugins...21:57:33
Plugins loaded!21:57:33
Reset variables...21:57:33
Setting value for Trier
order: "asc"
column: "Numero"
special: false21:57:33
Setting value for DateCourse
"28/01/2024"21:57:33
Setting value for NumGeny
"10084028012024"21:57:33
Setting value for NumCourse
"7"21:57:33
Setting value for NomChv
"GRANVILLAISE BLEUE"21:57:33
Setting value for Discipline
"MONTE"21:57:33
Setting value for EntJoc
"E"21:57:33
Setting value for NomEntJoc
"DUVALDESTIN TH."21:57:33
Executing before collection fetch app workflows...21:57:33
Before collection fetch app workflows done!21:57:33
Executing before collection fetch workflows...21:57:33
DateJour
Start page workflow DateJour21:57:33
DateJour • variable
Setting value for DateCourse
"15/06/2024"21:57:33
DateJour • variable
Succeeded 🎉
"15/06/2024"21:57:33
DateJour
Workflow done!21:57:33
Before collection fetch workflows done!21:57:33
Fetching static collections data...21:57:33
Start fetching collection Reunions21:57:33
Start fetching collection Courses21:57:33
Start fetching collection Chevaux21:57:33
Data fetched for collection Courses21:57:34
Data fetched for collection Reunions21:57:34
Data fetched for collection Chevaux21:57:34
Static collections fetched!21:57:36
Executing app load workflows...21:57:36
App load workflows done!21:57:36
Executing on load workflows...21:57:36
ChargeReunionsCoursesChevaux
Start page workflow ChargeReunionsCoursesChevaux21:57:36
Start fetching collection Reunions21:57:36
Data fetched for collection Reunions21:57:36
ChargeReunionsCoursesChevaux • fetch-collection
Succeeded 🎉21:57:36
ChargeReunionsCoursesChevaux • variable
Setting value for NumGeny
"10401315062024"21:57:36
ChargeReunionsCoursesChevaux • variable
Succeeded 🎉
"10401315062024"21:57:36
ChargeReunionsCoursesChevaux • variable
Setting value for NumCourse
"11"21:57:36
ChargeReunionsCoursesChevaux • variable
Succeeded 🎉
"11"21:57:36
Start fetching collection Courses21:57:36
Data fetched for collection Courses21:57:37
ChargeReunionsCoursesChevaux • fetch-collection
Succeeded 🎉21:57:37
Start fetching collection Chevaux21:57:37
Data fetched for collection Chevaux21:57:37
ChargeReunionsCoursesChevaux • fetch-collection
Succeeded 🎉21:57:37
ChargeReunionsCoursesChevaux
Workflow done!21:57:37
On load workflows done!

Do you have Fetch collection automatically in your collection settings?

image

I turn It off.

What “Automatically” realy signify ?
First pass on page ?
Change on params ?

Thanks for your help.

The “fetch automatic” option on a collection setting in WeWeb determines whether the collection should be automatically fetched when the app is first loaded. If this option is enabled, the collection will be fetched automatically on every page load if the collection is used on the page. If it is disabled, it requires a manual fetch action through a workflow to retrieve the data

1 Like