Show notes: expression and variable expansion

Hi all,
Has anyone managed to do something like this in the show notes?

$(StateCount > 0 ? "StateIndex of StateCount" : "")

I’ve tried multiple variations with brackets around each variable, dollar signs in front but I can’t get it to work.

Thanks in advance!

Hi mmichaelc,

Your expression works here. What exactly is it showing you?



Hi Dave,

Thanks for checking.
I’m just getting the literal text “StateIndex” and “StateCount” instead of the variable value.

Oh, I didn’t know that’s what you are after. This will display the count.


returns the number of states in the song so if I have no extra states in a song (the first state is always there) it returns 0 if I add 2 more states bringing the total to 3 it returns 2. Is that what you are looking for?

Sorry, I didn’t explain in my original post.
I’d like to have a note showing the current state out of the total, to see how far I am in a song.
But if there aren’t any states then

$(StateIndex) of $(StateCount)

- of 0
so I’d rather have the text hidden when there aren’t any states, hence the ternary expression.
True, I could just not have that note for those songs but I’m trying to set up a template song that works for all cases.


Is this the ticket?

$(StateCount > 0 ? "State " :"")$(StateCount == 0 ? "":StateIndex)$(StateCount > 0 ? " of " :"")$(StateCount > 0 ? StateCount :"")


It Blanks it all out if there are no added states in a song


Ah, genius!
Never would have thought of that.
Thanks @dave_dore

1 Like