Forum Discussion

mdfw's avatar
mdfw
Genius
3 years ago

Community: Variable scoping in a quilt

Given a quilt that has:

<component id="poodle-moth"/>
<component id="dumbo-octopus"/>
<component id="batfish"/>

Is there a way to set a variable in component "poodle-moth" that then can be read in component "dumbo-octopus" or "batfish"? Assign is scoped to the component or endpoint it is defined in. Local is even more tightly scoped. Is there a "Quilt" or "Global" assignment that can cross component boundaries? 

Reason: I want to do a lookup in poodle-moth, display parts of what it found in dumbo-octopus and batfish without having to do the lookup again.

Having written all this, I guess one way to do this would be to wrap these three components in another component then pass them in...would that work? 

  • mdfw 

3 Replies

  • mdfw