Seems to be a problem with my own code. But can't find where the problem lies...
Code example used for item color calculation (important lines at the end of function):
Function CalcColor
(Urgency, Item, xMO, itemColor, Solution)
' calculation of the itemcolor color code based on the Urgency level
if isnull(Urgency) then
CalcColor = ""
else
if Urgency < -10 then
CalcColor=""
elseif Urgency <=-3 then CalcColor="&H1AF3FF"
elseif Urgency < 0 then CalcColor="&H1AB5FF"
elseif Urgency <=5 then CalcColor="&H1A70FF"
else CalcColor="&H1A1AFF"
end if
end if
elseif xMO <> 0 then
CalcColor="Moss"
elseif solution <> 0 then
CalcColor="Powder"
end if
end if
End Function
If necessary : steps to reproduce the problem
1- Copy the provided code in User code (to replace the original IQ
CalcColor
function)2- Copy this equation in the itemcolor field equation textbox :
=CalcColor(Urgency, Item, xMO, itemColor, Solution)
3- a) Create two YES/NO fields : one called
xmo
, and one called Solution
. b) and add this to condition format rule to the xMO one :
A:itemcolor="moss" | E:itemcolor=
(note that "moss" must correspond to some color code in IQ's options)
4- open a grid and create an item including the string "solution" (eg : "trouver solution pour...") in the "item" field.
5- the itemcolor field won't get the appropriate color and will stay blank : the "solution" word in the item text either conflicts with the VB function integrating values from the "solution" field, or something else....
4- open a grid and create an item including the string "solution" (eg : "trouver solution pour...") in the "item" field.
5- the itemcolor field won't get the appropriate color and will stay blank : the "solution" word in the item text either conflicts with the VB function integrating values from the "solution" field, or something else....
I can reproduce that even if the function parameter "solution" (that refers to the "solution" field) is given another name (like "soln" or whatever).
Comments