I am trying to "fake" right-justify my rating stars in theater view. Unfortunately there is no expression to:
Print( ,Math(30 - (Length([Name]))) if you catch my drift.
The only solution I could come up with was to create a library field (Justify) with a value of " " for all files and then do a RemoveRight([Justify],(Length([Name]))) in my theater view:
If(isequal([Media Type],Audio,1),[Name]RemoveRight([Justify],Length([Name]))[Rating.Display],If(isequal([Media Sub Type],TV Show,1),[Episode] [Name] [Date],[Name] /([Year]/)))
However, Length() does not seem to include spaces, so I included the RemoveCharacters() function:
If(isequal([Media Type],Audio,1),[Name]RemoveRight([Justify],Length(RemoveCharacters([Name], )))[Rating.Display],If(isequal([Media Sub Type],TV Show,1),[Episode] [Name] [Date],[Name] /([Year]/)))
However, the RemoveCharacters doesn't seem to remove spaces.
Next, I tried the Replace function:
If(isequal([Media Type],Audio,1),[Name]RemoveRight([Justify],Length(Replace([Name], ,)))[Rating.Display],If(isequal([Media Sub Type],TV Show,1),[Episode] [Name] [Date],[Name] /([Year]/)))
Still no go. Pulling my hair out!
Edit: I've also tried adding the leading "/" in front of the spaces, in both the Justify field and the expression:
If(isequal([Media Type],Audio,1),[Name]RemoveRight([Justify],Length(Replace([Name],/ ,)))[Rating.Display],If(isequal([Media Sub Type],TV Show,1),[Episode] [Name] [Date],[Name] /([Year]/)))