0

I need to do something like:

[onshow;if [onload.project.sortBy]='Id';then if [onload.project.sortAscending]=1;then '↓';else '↑']

But, perhaps as expected, ↑ is always displayed.

What's the alternative here?

Thank you and be well.

1 Answers1

1

The expression then if is not support by TBS.

You're trying to perform a AND operation between ([onload.project.sortBy]='Id') and ([onload.project.sortAscending]=1) but TBS does not support logical operators.

So here are 3 workarounds:

1) Solution using multiple if/then parameters :

[onshow;if '[onload.project.sortBy]'!='Id';then '↑';if [onload.project.sortAscending]=1;then '↓';else '↑']

2) Solution by simulating AND with concatenation :

[onshow;if '[onload.project.sortBy]-[onload.project.sortAscending]'='Id-1';then '↓';else '↑']

3) Solution using custom variable :

[onshow;if '[onload.project.sortByIdAscending]'='1';then '↓';else '↑']
Skrol29
  • 5,402
  • 1
  • 20
  • 25
  • That did it. The solution that worked was `[onshow;if [onload.project.sortBy]!='Id';then '';if [onload.project.sortAscending]=1;then '↓';else '↑']`. Thank for the quick reply and a big, big thank you for developing TBS and making available for free. It is a gem. Good karma to you. –  May 02 '18 at 04:36