Advanced variable comparison

Hi Andy,
I am looking for something a bit different and I am not sure how to resolve it.
I will do my best to explain.
I understand this requires more advanced coding that I am struggling to understand to get it to work.
I have tried using internal boolean expressions but I have not been able to get it work.
If it is a case of getting the right boolean expression to work, that would be great.

The idea is to use the stream deck to display (feedback) a name of a singer based on the label on the channel.

Here is the hard part:
The name I would like to display on the stream deck is not the same name as the channel name.
EG. channel label on the CL des shows: 3 Chris

I would like to show on companion:
Christopher

So as a scene on the sound desk is recalled the label on the stream deck would change.

The idea of getting it work: (let me know if I am wrong with this)
Auto variable of the label name from the sound deck. (eg. 3 Chris)
Compare part of the variable name to a predetermined value ('Chris)
Show on the button a name based of the comparision. (Christopher)

Thanks heaps.

There’s probably several ways to do this, but the way I was thinking might be easiest is to use the jsonpath function within companion.

Steps:

  1. Create a custom variable, call it “Names” or somthing. (the variable is addressed as $(custom:Names) in this case). It’s filled with key/value pairs in a json format.
  2. Use the auto-create variable function within the RCP module to get the channel name for the channel you want the name replaced
  3. Use the jsonpath function to find the name and replace it on the button label. Make sure the label is set to variable mode (looks like a $ instead of an A)

Custom variable:

Button:

Channel name (for reference):
image

Thanks for that.
You’re amazing, I’ve spent ages on this.
With a slight modification, I have managed to get it to recall a button setup (name/picture)
Much appreciated.

1 Like