Paul Ramsden Messages: 75 Registered: February 2011 Location: BW, Germany
Member
I have been trying to use the following expression in a highlight rule.
row["Status"].charAt(0) equalTo '1'
It never seems to work.
I also tried
new String(row["Status"]).charAt(0) equalTo '1'
row["Status"].charAt(0) == '1' IsTrue
... no luck
Am I doing something wrong here?
On a related point:
I believe that the data is correct but I would like to debug this or spit out some kind of trace to make sure. How could I do this?
Is row["Status"] a string? Take a look at the attached example. Select
the product code and see the highlight rule.
Jason
On 6/26/2012 8:42 AM, Paul Ramsden wrote:
> I have been trying to use the following expression in a highlight rule.
>
>
> row["Status"].charAt(0) equalTo '1'
>
>
> It never seems to work.
>
> I also tried
>
>
> new String(row["Status"]).charAt(0) equalTo '1'
>
> row["Status"].charAt(0) == '1' IsTrue
>
>
> ... no luck
>
> Am I doing something wrong here?
>
>
> On a related point:
> I believe that the data is correct but I would like to debug this or
> spit out some kind of trace to make sure. How could I do this?
>
Is row["Status"] a string? Take a look at the attached example. Select
the product code and see the highlight rule.
Jason
On 6/26/2012 8:42 AM, Paul Ramsden wrote:
> I have been trying to use the following expression in a highlight rule.
>
>
> row["Status"].charAt(0) equalTo '1'
>
>
> It never seems to work.
>
> I also tried
>
>
> new String(row["Status"]).charAt(0) equalTo '1'
>
> row["Status"].charAt(0) == '1' IsTrue
>
>
> ... no luck
>
> Am I doing something wrong here?
>
>
> On a related point:
> I believe that the data is correct but I would like to debug this or
> spit out some kind of trace to make sure. How could I do this?
>
Is row["Status"] a string? Take a look at the attached example. Select
the product code and see the highlight rule.
Jason
On 6/26/2012 8:42 AM, Paul Ramsden wrote:
> I have been trying to use the following expression in a highlight rule.
>
>
> row["Status"].charAt(0) equalTo '1'
>
>
> It never seems to work.
>
> I also tried
>
>
> new String(row["Status"]).charAt(0) equalTo '1'
>
> row["Status"].charAt(0) == '1' IsTrue
>
>
> ... no luck
>
> Am I doing something wrong here?
>
>
> On a related point:
> I believe that the data is correct but I would like to debug this or
> spit out some kind of trace to make sure. How could I do this?
>
Is row["Status"] a string? Take a look at the attached example. Select
the product code and see the highlight rule.
Jason
On 6/26/2012 8:42 AM, Paul Ramsden wrote:
> I have been trying to use the following expression in a highlight rule.
>
>
> row["Status"].charAt(0) equalTo '1'
>
>
> It never seems to work.
>
> I also tried
>
>
> new String(row["Status"]).charAt(0) equalTo '1'
>
> row["Status"].charAt(0) == '1' IsTrue
>
>
> ... no luck
>
> Am I doing something wrong here?
>
>
> On a related point:
> I believe that the data is correct but I would like to debug this or
> spit out some kind of trace to make sure. How could I do this?
>
Is row["Status"] a string? Take a look at the attached example. Select
the product code and see the highlight rule.
Jason
On 6/26/2012 8:42 AM, Paul Ramsden wrote:
> I have been trying to use the following expression in a highlight rule.
>
>
> row["Status"].charAt(0) equalTo '1'
>
>
> It never seems to work.
>
> I also tried
>
>
> new String(row["Status"]).charAt(0) equalTo '1'
>
> row["Status"].charAt(0) == '1' IsTrue
>
>
> ... no luck
>
> Am I doing something wrong here?
>
>
> On a related point:
> I believe that the data is correct but I would like to debug this or
> spit out some kind of trace to make sure. How could I do this?
>
Is row["Status"] a string? Take a look at the attached example. Select
the product code and see the highlight rule.
Jason
On 6/26/2012 8:42 AM, Paul Ramsden wrote:
> I have been trying to use the following expression in a highlight rule.
>
>
> row["Status"].charAt(0) equalTo '1'
>
>
> It never seems to work.
>
> I also tried
>
>
> new String(row["Status"]).charAt(0) equalTo '1'
>
> row["Status"].charAt(0) == '1' IsTrue
>
>
> ... no luck
>
> Am I doing something wrong here?
>
>
> On a related point:
> I believe that the data is correct but I would like to debug this or
> spit out some kind of trace to make sure. How could I do this?
>
Also may want to put a check in for null, because this will most likely
cause the highlight to fail.
Jason
On 6/26/2012 12:02 PM, Jason Weathersby wrote:
> Is row["Status"] a string? Take a look at the attached example. Select
> the product code and see the highlight rule.
>
> Jason
>
> On 6/26/2012 8:42 AM, Paul Ramsden wrote:
>> I have been trying to use the following expression in a highlight rule.
>>
>>
>> row["Status"].charAt(0) equalTo '1'
>>
>>
>> It never seems to work.
>>
>> I also tried
>>
>>
>> new String(row["Status"]).charAt(0) equalTo '1'
>>
>> row["Status"].charAt(0) == '1' IsTrue
>>
>>
>> ... no luck
>>
>> Am I doing something wrong here?
>>
>>
>> On a related point:
>> I believe that the data is correct but I would like to debug this or
>> spit out some kind of trace to make sure. How could I do this?
>>
>
>
Paul Ramsden Messages: 75 Registered: February 2011 Location: BW, Germany
Member
Thanks for the replies.
I am pretty certain that the value is a string and is not null. The string is always 2 chars, xy, where x indicates attendance (0 or 1) and y is the role (., M, B or X). The role is output as text in the cell. The attendance is used highlight the cell (change background colour).
The role value does appear correctly using normal data binding (e.g. dataSetRow["Day1"].charAt(1))
I am not certain why this happening. Can you reproduce with the sample db?
Jason
On 6/27/2012 12:33 AM, Paul Ramsden wrote:
> Thanks for the replies.
>
> I am pretty certain that the value is a string and is not null. The
> string is always 2 chars, xy, where x indicates attendance (0 or 1) and
> y is the role (., M, B or X). The role is output as text in the cell.
> The attendance is used highlight the cell (change background colour).
>
> The role value does appear correctly using normal data binding (e.g.
> dataSetRow["Day1"].charAt(1))
>
> Is it possible to debug javascript?