Submitted by desbest on 2023/10/06 14:55

 

I'm trying to change the colour of the row entry, based on what option I've chosen for the multi-select dropdown box. I mean the category field.

The problem is that it doesn't acknowledge the name of the category that I've chosen. It always ends up being purple, no matter what.

 

infoqube playlist colour function 1infoqube playlist colour function 2

infoqube playlist colour function 3

infoqube playlist colour function 4

 

Below is the VBScript I'm using.

Function PlaylistColour(Category)   ' calculation of the itemcolor color code based on the Urgency level
  if isnull(Category) then 
        'PlaylistColour = ""
    else
        if Category = "Miscellaneous" then
     PlaylistColour="Blue"
    elseif Category = "Vocal" then 
            PlaylistColour="Green"
    else 
            PlaylistColour="Purple"
        end if
    end if
End Function
 

Comments

Hi,

Unless you've made changes (in Tools>Options), the field which sets the item back color is ItemColor. There may already be a row equation for it, if yes, your best option is to disable it and instead use Auto-Assign rules for the Category field, such as:

AM:[ItemColor] = PlaylistColor([Category])

HTH!

 

Hi,

It works fine when using auto-assign rules. If using row equations, you must click on the ... menu (just right of the F1 link) and do Recalculate Dependencies

HTH!

 

There are 2 issues:

  1. A typo in your auto-assign function. It should be PlaylistColour !
  2. There are line feeds in the list and these are not removed. This will be fixed in the next version. For now, enter it as option1 | option2 | option3...
How do I ?