Hello :wave: I have a question about feature flag...
# ask-questions
p
Hello 👋 I have a question about feature flags and projects : I have 2 frontend (one web and one native), and so I have configured 2 sdk connections (one for each). So for each connection, in "Filter by projects", I have selected the corresponding project. Is it possible to share a feature flag between the 2 projects ? To test it, I have created a feature flag forced to true. In "Feature Information", you can only select one project : • if I select None, the flag stays at false for both projects • if I select a project, the flag flip to true for the corresponding project but not for the other one • in the sdk connection if I select both projects, (or all projects), it is working correctly but they receive all features flags What is the recommend approach for that ?
f
Hi Nicholas 👋 The recommended approach is to use a shared project for flags that need to be available to both SDK connections. SDK connection project filters only include features assigned to the selected project(s), so if Web SDK is filtered to
Web
and Native SDK is filtered to
Native
, a feature assigned only to one project will only appear in that one SDK payload. For shared flags, create something like a
Shared
or
Cross-platform
project, assign the shared feature to that project, then include that project in both SDK connections alongside the platform-specific project. That way: • Web receives Web + Shared flags • Native receives Native + Shared flags • Neither receives all unrelated flags
p
Hello @flaky-noon-11399, perfect explanations and it is working, that was exactly what I was looking for. Thank you !
f
My absolute pleasure to assist 🌻