On 28 Apr 2005, at 22:02, Christian Cypert wrote:

<% if((get session("employee_name")#[Customer]OTSName)|(get session("employee_name")#[Customer]ITSName)) %>
<td align="left"><% write([Customer]Number) %></td>
<% else %>
<td align="left"> <b><a href="<% =makeLinkCustomer %>"> <% write([Customer]Number) %></a></b></td>
<% end if %>


<% case of %>
<% : (get session("employee_name")#[Customer]OTSName) %>
<td align="left"><% write([Customer]Number) %></td>
<% : (get session("employee_name")#[Customer]ITSName) %>
<td align="left"><% write([Customer]Number) %></td>
<% else %>
<td align="left"> <b><a href="<% =makeLinkCustomer %>"> <% write([Customer]Number) %></a></b></td>
<% end case %>

Try

<% if((get session("employee_name")=[Customer]OTSName)|(get session("employee_name")=[Customer]ITSName)) %>
<td align="left"> <b><a href="<% =makeLinkCustomer %>"> <% write([Customer]Number) %></a></b></td>
<% else %>
<td align="left"><% write([Customer]Number) %></td>
<% end if %>


I always find that it is easier to understand conditional statements which are based on 'equals' statements than 'not equals'.

In your second case you should bear in mind that the 'Case Of' condition ends as soon as a true statement is encountered. If the first test is true then the others will not be considered.

David Wright

_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to