Working with Namespace datasources

Hello,

working with namespaces is a bit strange.

I have a namespace datasource that gets assigned a value through the click of a button. The click also leads to opening a new page within the same tab. In this new page there are a few webform loaders. one of those webform loaders should load the proper webform/page based on the namespace datasource value.

Alas, the value somehow is either not set or forgotten after loading the new page. If I do the same thing with a button within the same page, the webform loader loads the proper page as the namespace datasource behaves correctly.

My assumption is that namespace datasources lose their values as soon as a new page is loaded within the same browser tab. This renders the namespace datasources more or less useless.

I was posting a similar issue here but in the meantime it never works. I understand why it might not work with Qodly Studio for 4D but now it also doesn’t work with the standalone version.

I am using already version 1.0.0-beta5.

Can anyone confirm or tell me what am I doing wrong?

Hello Tilman,

After several tries, I noticed the same thing as you.

Namespaces work to share data from one webform to another but only in the case where the page change is done by a webform loader.
Your hypothesis is therefore the correct one in my opinion.

To get around the problem I can advise you to display your pages using only a webform loader, as you said when the browser changes pages everything in the namespace will be replaced or deleted so to avoid that we does not refresh the entire page but only the webform Loader !

Currently, I create a “Home” page in which I simply put a webform Loader (If you have things that must remain throughout the navigation like a navbar you can also put it here)
In this webform Loader, I use it as a basis for the entire application and therefore when I have to change pages it is this webform Loader which changes value.

This allows me to fully use namespaces throughout the application.

I hope this helped you

1 Like

Hello Cyril,
thank you, this is also what Ayoub advised me to do. Based on a sample he created for me I did just that and it works like a breeze.
For me as a decade long 4D developer it takes a while to wrap your head around the different way of thinking in a web context but Qodly really helps getting things done.
I can’t wait until the product comes out of its beta stage!