Report not properly generated when condition statement is added

Hi,

I am trying to show sentences based on the conditions.
I need to hide the block: [when value>=3 or value <0] Not an area of concern (good/average score).
[when value> 0] Feedback could not be provided
[when value<3] More concerns than average (elevated score).

I am using same shortid's for all 3 sentences according to the conditions, but while rendering the report the output also shows the condition and shortid . The sentence work perfectly when 2 conditions are included but makes mistake when 3rd condition is added.

Template :
Total Score

{{_yaNEcmXo.default}:hide-block-if(value >= 3 || value < 0)}Not an area of concern (good/average score).

{{_yaNEcmXo.default}:hide-block-if(value >= 0)}Feedback could not be provided due to omitted item responses.

{{_yaNEcmXo.default}:hide-block-if(value < 3)}More concerns than average (elevated score).

Rendered report :
Total Score

{{_yaNEcmXo.default}:hide-block-if(value >= 3 || value < 0)}Not an area of concern (good/average score).

3Feedback could not be provided due to omitted item responses.

More concerns than average (elevated score).

Json:

{
"_yaNEcmXo": {
"default":3,
"display": "?"
}
}

Thank You
Hridya Divakaran

Hello @hridyadivakaran,

it's better to use differrent tags for these type of conditions. For example:

{{_yaNEcmXo.default1}:hide-block-if(value >= 3 || value < 0)}Not an area of concern (good/average score).

{{_yaNEcmXo.default2}:hide-block-if(value >= 0)}Feedback could not be provided due to omitted item responses.

{{_yaNEcmXo.default3}:hide-block-if(value < 3)}More concerns than average (elevated score).

The hide block if formatter doesn't work well with the same tag when receive multiple values from the JSON.

Best regards,
Petr
Plumsail team

Thank You so much it works :slight_smile:

1 Like