Hi there!
I have a column in a view that gives the status of an inventory item. If the status is “Out of stock” or “Backordered”, I want it to appear in red, so I have made a formula in the column that adds the html around the value when it equals these. Now, when I click on a column to sort it, it doesn’t sort properly.
Any ideas?
Thanks!
Gérald
Subject: Trouble sorting a view column that contains some html formatting.
hi you can insert something like that before your column-code:
YourColumnCode
Hope this will help…
Subject: RE: Trouble sorting a view column that contains some html formatting.
Unfortunately he will lose his ability to sort by clicking on the column.
Subject: RE: Trouble sorting a view column that contains some html formatting.
hm - the view i’ve got the code from is sortable (both: ascending and descending) , but i know formatting web-views is difficult and i am not very experienced with Notes & Web…
Subject: It worked! Trouble sorting a view column that contains some html formatting.
Thanks, Heinrich!
My column is now sorting. Here is my code:
“hidden name=‘hiddensort’ value='” + Inventorystatus + “'>]” +
@If(InventoryStatus=“Out of
stock”|InventoryStatus=“Low”|InventoryStatus=“Backordered”;“font
color=‘red’>” + InventoryStatus + “]”;InventoryStatus)

Gérald
Subject: RE: It worked! Trouble sorting a view column that contains some html formatting.
Hi Gerald,
to optimize the HTML use this instead:
“” + @If(…
which will insert a comment before the actual @If()-statement.
This also has the advantage that the hidden field is not sent back to the server if you are posting the view back etc.
Regards,
John