Or in value switches in sentence template

It would be very useful to be able to use “or” in value switches in sentence templates. For example, I would want it to display a text if a value exists in the Place OR the Description.

The | serves as “or” in Value “?” Switches. This|That = This or That

<?[Nurse]|He had a nurse.|He didn't have a nurse.> (From HELP)

@BobC That only checks one value, Nurse. I want to check two values and put the text there if either of them has something in it.

Confirming request has been reported to development.

1 Like

Based upon my limited testing ?Value only tests for
1 the existence of fields within a fact such as description, place or place details where the value is either yes or no or
2 such a fact exists.

It does not seem the Boolean Logic is supported within Facts nor Sentence Template Language. Someone more knowledgeable than I may come along with a different answer.

<?[Place][Desc]|Your text here|There were no values>

Should do what you asked for.

2 Likes

Do you also know a way to do and value switches?

This is an example of an AND between two fields such that both have to have a value for there to be output. Is that what you have in mind?

<?[Date]|<?[Desc]|[Date], [Desc]|>|>

or, generally,:

<?[Date]|<?[Desc]|Both fields have a value.|The second field has no value but the first one does.>|The first field has no value.>

This is a nested switch that is basically:

If A Then (If B Then C Else D End) Else E End

1 Like