TDL and SourceColumnIsNullable

Posts   
 
    
mikeg22
User
Posts: 411
Joined: 30-Jun-2005
# Posted on: 29-Sep-2005 20:15:49   

Is there a way to do something like this?

<[Foreach EntityField CrLf]><[If SourceColumnIsNullable]> some code... <[EndIf]><[NextForEach]>

So, for each entityfield, if a column is nullable I want to generate some bit of code. Any suggestions?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 03-Oct-2005 13:20:57   

This statement isn't available in TDL. Please use an .lpt template and use something like: <% foreach(EntityFieldDefinition field in entity.Fields) { if(field.MappedFieldIsNullable) { %> // your code <% } } %>

Frans Bouma | Lead developer LLBLGen Pro
mikeg22
User
Posts: 411
Joined: 30-Jun-2005
# Posted on: 03-Oct-2005 18:39:59   

Thanks simple_smile

I've only been using TDL, but I guess its time to start learning to use LPT.