Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag value labels applied to multiple variables #12

Open
arthur-shaw opened this issue Dec 26, 2023 · 0 comments
Open

Flag value labels applied to multiple variables #12

arthur-shaw opened this issue Dec 26, 2023 · 0 comments
Labels
value 🏷️ Value label

Comments

@arthur-shaw
Copy link
Contributor

Problem

In Survey Solutions--and in practice for data producers--a value label set is applied to only one variable at a time (even if that value set is reusable category in Designer).

Even if it might be more advantageous to have a single value set applied to multiple variables, data producer conventions may be the more traditional one-value-set-one-label approach. For that convention, there' no good tooling to identify where a value set is applied to more than one variable.

Implementation ideas

  • Identify value sets via r(names) returned by label dir
  • Get a list of variable(s) using each value set via ds, has(vallabel label_name)
  • Store value set name in a macro when the length of the list from the prior step is greater than 1
  • Return list of value labels with more than 1 variable usage in r(names) (or other conventional name)
@arthur-shaw arthur-shaw added the value 🏷️ Value label label Dec 26, 2023
@arthur-shaw arthur-shaw added this to the v1.1 milestone Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
value 🏷️ Value label
Projects
None yet
Development

No branches or pull requests

1 participant