I allways liked the case(onething; do something ; else another thing) function in Filemaker.
You can do it 2 ways in Servoy:
- Switch statement (which I find a bit to much of code sometimes)
- or this way, which looks a lot like the case function itself:
- Code: Select all
var result = (onething == 'something') ? onething : another thing
You can also check if a field has values in it:
- Code: Select all
var result = (onething) ? onething : another thing
Pretty neat, huh?