Author: Peter_Jodeleit
Publication Date: 6/30/2010 15:41
Ok, perhaps nothing for every-day-templating...
The first 10 square numbers:
The sum of numbers from1 and 100:
$CMS_VALUE([1..10].map(x -> x*x))$
Even numbers between 1 and 100:
$CMS_VALUE([1..100].filter(x -> x.even))$
$CMS_VALUE([1..50].map(x -> x * 2))$
The count of numbers between 1 and 100:
$CMS_VALUE([1..100].fold(start:0, x -> start+1))$
$CMS_VALUE([1..100].fold(y:0, x -> x+y))$==$CMS_VALUE((100 * 101) / 2)$The product of numbers from 1 to 100 (factorial):
$CMS_VALUE([1..100].fold(y:1, x -> x*y))$
Try the last one in a calculator :smileywink:
Tested with FS4.2R2
Tags: fs4.2, funny, knowledgebase, template
Kommentare
3 Kommentare
i add the tag knowledgebase, you can pretty combine this with Sort / Filter database records afterwards by a field in a foreign table
i moved this post to the developer blog
This is very nice!
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.