What is the recommended naming convention for components (and queries) when using multiple pages?
Let’s say I have a database table called A. One page does work on a subset of A, while the other does work on another subset of A.
These pages shares some functionality, which works fine, but I have an issue with naming components since I can’t have two selectData' s, even if they are on different pages.
Would somebody recommend a way forward? The only solution I’m seeing is adding the page name to each component, but I’d only do that as a last resort, for obvious reasons.
Let’s take selectCustomer as an example: I need to use a select that lets my users select customers on multiple pages, but retool doesn’t let me reuse the name on different pages. How would you solve that?
@dakes I think in this case would be good to add the page name in each variable, if you don't have anything that specifies more each variable. Can't you define it in the global scope?
I’m probably not using components and pages right, but when I make a local component (let’s take a drawerFrame) global the drawerFrame can’t access data/queries in the local scope. One option would be to throw everything into the global scope, but then why have a local scope?
I have one subset of data on one page, shown in a table component for example. I can’t use a global drawerFrame because the components on the drawerFrame won’t be able to access the data in my (local) table component.
Usually I add code/variables inside the local scope if they only needs to be used there, but if I will need some information in different pages, I used it in the global scope.
can't you set an aux variable or something to help saving the state of the component and use it where you need?
Hmmm, I could, but I think that kinda defeats the purpose. I’m trying to cut down on components and queries I need to keep an eye on. Global variables that might get set by an unknown number of local queries seems like it’d lead to more issues down the line.