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

Ability to Import Custom Variables #3229

Open
2 tasks done
Lukeb873 opened this issue Jan 23, 2025 · 3 comments
Open
2 tasks done

Ability to Import Custom Variables #3229

Lukeb873 opened this issue Jan 23, 2025 · 3 comments
Labels
area/import-export Related to the import/export processes. Enhancement New feature or request

Comments

@Lukeb873
Copy link

Is this a feature relevant to companion itself, and not a module?

  • I believe this to be a feature for companion, not a module

Is there an existing issue for this?

  • I have searched the existing issues

Describe the feature

Ability to import custom variables from a config

When importing some config files to our machines, there's one variable that is necessary for a button to work right. The variables name stays the same across all configs, so the button should always know how to reference it regardless of config, but there's not currently a way to import just custom variables without doing the entire config. So I end up having to remake the variable each time. Does companion check variables by just looking for a variable with the same name or is a variable assigned a hidden number companions actually looking for? I've re created the custom variable before but the button wouldn't work without re telling it about the variable. I was hoping it would auto-link it.

Usecases

During partial config imports of a page with buttons on it that reference custom variables that don't exist in the destination config

@Julusian Julusian added Enhancement New feature or request area/import-export Related to the import/export processes. labels Jan 23, 2025
@Julusian
Copy link
Member

Does companion check variables by just looking for a variable with the same name or is a variable assigned a hidden number companions actually looking for? I've re created the custom variable before but the button wouldn't work without re telling it about the variable. I was hoping it would auto-link it.

We use just the user visible name of it.
I can't think why it wouldn't 'link', other than the naming scheme has changed in betas. The old names still work but the ui doesnt indicate this

@Lukeb873
Copy link
Author

Gotcha. Yeah, I had to recreate the variables. To be clear, if the custom variables variable was set to be the text on a button that worked, but the action of changing what the variable of a custom variable was did not link even when the variables had the same name after import. Without the ability to import custom variables with, this was a minor inconvenience. But one that should be documented as a "when there's time" request.

@robertskiba
Copy link

I might have a workaround for that:

Currently (3.44) you can use the command "Create or set variable" to create a variable with a command.

In my presets I publish, I create a "press-me-once" button that may only be pressed once, creates all variables, sets itself to step2 (do nothing when pressed once more) and sets its text and background color to black.

With this solution, you can create and set all variables to a value and maybe even set a value after restart of companion or whatever you like to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/import-export Related to the import/export processes. Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants