Forum Index

No notifications


No favorites found
General Training Discussion General chat and comment on KnowledgeKube training
Subscribe to post
User avatar
matt.pitman - (27/09/2016 11:18:45)
RE:Change row Output of Derived Column in Data Source Grid
The Derived column will return the result of the final statement to be parsed in the expression. When I tested this I got 1 or 0 in my derived column, signifying whether the If statement resolved to True or False. To get the desired result, you will need to assign the result of your FormatString statements to a new variable, and write the name of that variable as a final statement, followed by a semicolon. For example:
if:(Mod(Id,2) = 1)
	VARResult:= FormatString(CustomVariable1,"Image,Body");
	VARResult:= FormatString(CustomVariable2,"Body,Image");
Notice that I've also placed the Modulo expression inside the If statement's condition? The effect is the same without needing to assign its result to a variable and then evaluate it. Feel free to follow this suggested change if the variable is not used elsewhere. Edit: Updated code to include FormatString.
RSS Feed