Add line of code for String types

Posts   
 
    
DvK
User
Posts: 318
Joined: 22-Mar-2006
# Posted on: 21-Sep-2020 15:53:27   

Hi,

I'm trying to edit the entityIncludeAdapter.template file and add a static property for String-based properties. How can I use/check the TypeOfField in the proper manner to make this work?

I now ended up with this, but that's not working : <[ If [TypeOfField] == "System.String"]>public static int <[EntityFieldName]>MaxLength = <[SourceColumnMaxLength]>;<[EndIf]>

It results in : If[TypeOfField] == "System.String"]>public static int BarCodeMaxLength = 100;

Kind regards and thanks in advance, Danny

Walaa avatar
Walaa
Support Team
Posts: 14986
Joined: 21-Aug-2005
# Posted on: 21-Sep-2020 20:27:50   

Please try the following:

<[If IsStringField]>
text
<[EndIf]>