UserCodeRegion within a For Loop

Posts   
 
    
jshallard
User
Posts: 62
Joined: 23-Mar-2005
# Posted on: 07-Sep-2005 16:00:24   

Is there a way to add a User Code Region within a TDL for loop? If the following code is used, all the regions end up with the same name, and the contents of the first instance of the region are copied into all the following instances when the code is next generated.

<[Foreach RelatedEntity OneToMany]>

---

    <[ UserCodeRegion "UserCodeRegionName" ]>

---

<[NextForeach]>

Is there perhaps a way to create a unique name for the region within the loop? For example, something like the following (which does not work):

<[Foreach RelatedEntity OneToMany]>

---

    <[ UserCodeRegion "UserCodeRegionName_<[RelatedEntityName]>" ]>

---

<[NextForeach]>

Any help appreciated

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 07-Sep-2005 16:12:17   

Please see the <[UserCodeRegion StringValueName Pattern]> comment <[EndUserCodeRegion]> statement in the SDK docs. For an example, check the entity factory templates

Frans Bouma | Lead developer LLBLGen Pro
jshallard
User
Posts: 62
Joined: 23-Mar-2005
# Posted on: 07-Sep-2005 22:12:09   

Thanks!