Is there a way to copy/duplicate app/page/data variables? I’m in the middle of adding eight app variables with identical (and very complex) schema – many objects within objects, courtesy Firestore – and I find myself thinking that this is the kind of tedious task that a computer could do in two seconds.
Unfortunately not yet… It’s on the backlog, but other features have been prioritised over it. I don’t know when it’ll be implemented, even though I agree with you its tiresome to copy the schemas and automatic solution would be very useful.
But: It’s not necessary to have all properties in the schema if you don’t use those in the bindings. The other properties will be saved to the variables anyway and you can access those via Formulas even if the editor shows you a warning when using a property name that’s not in the schema. So if you have a complex schema, it might be easier to copy only the part of schema that you will use with that specific variable or even leave the variable without any schema. On the other hand, this could make the logic and bindings harder to follow so make sure what you want before choosing your way to operate.
I was excited about this revelation that not all properties need to be included in the schema, but then I kept running into errors that wouldn’t let me proceed: “object with 4 properties cannot be assigned to object with 1 property,” or even the mysterious, “object with 1 property cannot be assigned to object with 1 property.” Unless I’m missing something obvious (which is totally possible! I am a true "no-code"r ), I think this probably only works if you’re not binding app/page variables to data variables with existing schema. If the schema is fully defined on one side and not the other, the binding option isn’t given.
Well, okay. Based on my wording it probably felt that “almost everything can be assigned to anything”, but that’s not the case, there’ strict limitations for that.
Let’s say you have two Objects A and B. A has tons of properties and B has none to start with. This means B can be set with value A, but A cannot be set with value B. This is due to Objects requiring to have all of its properties available in the objects it’s being assigned with. So if you add a property to B, it has to one of A’s properties and the property type has to match exactly.
I’d advice you to check that the properties you have added to your Object B have exactly the same name and type as the related property of Object A. I think this should work, though I’m not 100% sure if there are some additional limitations considering more complex property types.
Thank you for the clarification – much appreciated