Kobalt,
Thank you for taking the time to respond to me. Your response prompted two things:
- that my explanation of the issue was incomplete; and
- go back and look at this issue again.
I had already spent a couple of days on the issue before posting the question to the forum so was cautious about spending much more time on it without further guidance. The resolution, as it happens, is actually reasonably straightforward and the main issue (once again) is a lack of documentation.
When editing a content type, you can select 5 to access the Conditional States and Computation. All Seblod's documentation illustrates Computations using simplistic arithmetic operators +-*/. My question was whether Computations could handle IF statements and if they could what syntax is followed.
Having looked at this again following your response Kobalt, and through a complete fluke when having experienced an Unexpected Token error found a Java article online. I rewrote the if statement as
if ( a > 650) { result = 'Red'; } else { if ( a > 199) { result = 'Amber'; } else {result = 'Green'; }}
And it worked in my Content Type. So the short answer is Computations can handle IF statements and the syntax follows Java.
The issue I face now is that in my List & Search form, no matter what the output is in the Content Type, the output in the List & Search form is the number 3. One step forward and two back as they say!
Thanks for your help Kobalt; it is appreciated.
JT