fokane 74 posts msg #58694 - Ignore fokane |
1/2/2008 11:43:53 AM
Anyone familiar with programming langauges, C, Java etc. will know about for(), while() loops.
Is there a way to do this in SF?
I can do it manually by copy-pasting in the code for each iteration but it would be easier to just have this once in the program and run it each time in the loop.
The filter should return all results for each iteration of the loop.
|
nikoschopen 2,824 posts msg #58716 - Ignore nikoschopen |
1/2/2008 10:33:17 PM
If I had more time, which I do, I would rather look at more charts than to decipher codes, but technically you could use the count() function to achieve the loop, no? Or something along that line.
for ( int x = 0; x < 10; x++ ) // The loop goes while x < 10, and x increases by one every loop
count(x + 1,10)
x below 10
|
fokane 74 posts msg #58717 - Ignore fokane |
1/3/2008 4:59:51 AM
Thanks Niko, I appreciate your time. I'll check out your idea.
I want to spend more time looking at charts too which i will once i get this sorted.
|
basher 6 posts msg #71329 - Ignore basher |
2/11/2009 5:35:54 PM
Yes, SF does allow you to emulate loop logic by using the count and sum keywords.
For example, lets say you want to detect if a stock had 15 down days (red) out of the last 20. The script would be:
|