Hi,
We've got an Item value from the area. That Item (Alert types) is an Item List. How can we loop through that ItemList to match the value we need? We are actually loading all of the items from that table to match the value we need.
We tried to instance an Item Collection but get the error Using the generic type 'Dynamicweb.Content.Items.Collection' requires 1 type arguments
Please check attachment.
Quick view:
var obj_alertTypes = Collection("Alert_Type"); foreach (LoopItem i in GetLoop("Rows")){ foreach (var alert in obj_alertTypes){ if(alert.GetValue("Id") == i.GetValue("AlertType")){ var str_alertCssClass = alert.GetValue("CssClass"); break; } }
Nuno