Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Transformation IF Statement View modes: 
User avatar
Member
Member
justin-liquidprint - 10/8/2013 11:44:53 AM
   
Transformation IF Statement
I have a ASCX Transformation which basically produces a table of products. On this table I am using the CartItemSelector control to give the user the ability to Add to Cart.

The problem is some of the items returned may not be orderable based on a property on the document type. I can't seem to get a conditional IF Statement working in the transformation to show/hide the CartItemSelector control.
<% if(Convert.ToBoolean(Eval("lOrderable"))) { %>
<uc1:CartItemSelector
runat="server"
SKUID='<%# ValidationHelper.GetInteger(Eval("SKUID"), 0) %>'
SKUEnabled='<%# ValidationHelper.GetBoolean(Eval("SKUEnabled"), false) %>'
ShowUnitsTextBox="true"
/>
<% } %>

I know there are a lot of threads out there discussing this, but I have not come across a suitable solution yet for my specific problem.

User avatar
Member
Member
justin-liquidprint - 10/8/2013 11:49:26 AM
   
RE:Transformation IF Statement
This appears to be working now...no changes to the code. Guess my pages were cached. Sorry for the false problem post.