Tag: AddComment

The AddComment function does exactly that -- it adds a comment in the grid.

<AddComment columnTitle="grannotation" text="Le gras c'est la vie" ColumnID="displayName" color="#666069"/>
XML

Tag Attributes

AttributesAttribute ValuesValue DescriptionComment
TextN/AComment contentN/A
ColumnIDN/AUnique ID of column where you want to add the comment.N/A
ColumnTitleN/ATitle of new Comment columnN/A
ColorN/AHexadecimal RGB color code - background cell colorN/A
IsFormula

True / False (defaults to False)

If True, the comment text is evaluated as a Javascript formula whose resulting output is displayed in the grid cell.N/A
IsPrivateTrue / False (defaults to False)If false, comment is stored on the shared or cloud DB (e.g. Cosmos, provided the user license Cosmos info matches the current tenant in sapio365 - see About panel)N/A
TargetN/AGrid target name (unnecessary in sapio365).N/A
IsVolatileN/AOne of: Left, Center, Right - Sets text alignment in column format (cell && group)Not stored in DB - Better to use with volatile comments only
TextAlignmentN/AHexadecimal RGB color code - Grid cell text colorNot stored in DB. Better to use with volatile comments only
TextColorTrue / False (Defaults to False)If False, the comment is only added if the text is not blank (contains other characters than spaces).N/A
AddIfBlankTrue / False (Defaults to False)If False, the comment is only added if the text is not blank (contains other characters than spaces).N/A

Detailed Description

Referencing a column will put that column text into the comment. To reference a column, enclose its unique ID with # signs:

NOTE:Beware of circular references ! If comment A refers to Comment B, and B refers to Comment A, you lose.

Example Script

<ytriaAutomation Application="sapio365">
	<AddComment columnTitle="grannotation" text="Le gras c'est la vie" ColumnID="displayName" color="#666069"/>
</ytriaAutomation>
<ytriaAutomation Application="sapio365" console="false">
	<Select Lines="ByValue" Top="3">
		<SetParam ColumnID="groupType" Value="Security Group"/>
	</Select>
	<AddComment columnTitle="My Group Type Phrase" text="++ zer 666 CHAISE '#displayName' type is '#groupType#'" ColumnID="displayName" color="#AAAAAA" IsVolatile="True" 		
	TextAlignment="Center" TextColor="#00FF00"/>
</ytriaAutomation>
XML