Book a Demo

Author Topic: List Macro @indent Parameter Not Working EA 8.0  (Read 3555 times)

Roland Tucker

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
List Macro @indent Parameter Not Working EA 8.0
« on: October 20, 2010, 04:59:08 pm »
I have a transformation that is creating a stored procedure (i.e. class stereotype "procedure") and setting the "procdef" tagged value with the stored procedure code.

The following "list" macro with @indent="\t" (for tab) will not indent the list of columns in the following SELECT statement in EA 8.0, but it did in EA 7.5.

Code: [Select]
%PI=""%
$ncode="SELECT \n"
$ncode+=%list="Attribute__CrudFields" @separator=",\n" @indent="\t"%
$ncode+="\nFROM [dbo].[" + %className% + "]\n"

The variable $ncode then ends up in a class definition:

Code: [Select]
Class
{
 %TRANSFORM_REFERENCE("CrudGetList")%
 name = %qt%sp%className%GetList%qt%
 language = "DHW SP"
 stereotype="procedure"
 Tag
 {
 name="procdef"
 value=%qt%$ncode%qt%
 }
}

And this is what I end up with in EA 8.0, but not EA 7.5 which formats as expected with column names indented:

Code: [Select]
SELECT
[AssessmentDwellID],
[Bedrooms],
[Buildings],
[State],
[StrataOrPlanNo],
[PromisProjectID],
[UseDHWArch],
[Expired],
[CreatedBy],
[CreatedOn],
[UpdatedBy],
[UpdatedOn],
[Timestamp],
[AssessmentID],
[AssessmentLandID]
FROM [dbo].[AssessmentDwelling]


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: List Macro @indent Parameter Not Working EA 8.
« Reply #1 on: October 21, 2010, 08:25:55 am »
The indent macro is intentionally disabled in transformations as it causes issues with multi-line values such as notes.

Roland Tucker

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: List Macro @indent Parameter Not Working EA 8.
« Reply #2 on: October 21, 2010, 11:46:46 am »
Ah, thank you.