I would like to propose a new function/ macro to assist in creating virtual functions.
I, and many others, have a need to display certain information dynamically depending on information in the track. Here is a recent example:
$IsNull(<Album Library>,,$If(<Album Library>=1,<Publisher> - <Genre>,$If(<Album Library>=2,<Developer> - <Console> - <Sound Team> - <Original Album>,$If(<Album Library>=3,<Comment> - <Publisher>,$If(<Album Library>=4,<Work> - <Original Year>,)))))
I use a similar function to display different track icons depending on an index I save into a virtual field. It is a simple nested if statement. But I feel it is (1) hard to read, (2) difficult to maintain, and (3) tough to make changes to. We currently have a function very close to what I am asking for:
$Split(<field>,search-text,index)
The issue with the Split function is that the index needs to be a constant. EG - You cannot assign a virtual tag to the index field. I would either like to see:
(1) a change to the original where the index could be a virtual field or
(2) a new function
$Index(<field>,search-text,<indexNum>)
If we had such a function the above could have been shortened to:
$IsNull(<Album Library>,,$Index("<Publisher> - <Genre>:<Developer> - <Console> - <Sound Team> - <Original Album>:<Comment> - <Publisher>:<Work> - <Original Year>",:,<Album Library>))