Calculed field inside conditional branch

Calculed field inside conditional branch

von Yannick Faucherre -
Anzahl Antworten: 2

In my form, I have a calculated field named "sae_revasc_loc_tvr_all" which has to be completed regarding other fields in the same form.

When the user access the form, mosts of the fields are hidden due to a branching logic rule.

However, it seems like my field is being calculated before the branching rule applies. How can I manage this to be free of the following warning message?

Information: field is embeded in a table, but no green text indicated it on the designer (see 2nd capture).

image.png

image%20%282%29.png

Thanks for your help!

90 Wörter

Als Antwort auf Yannick Faucherre

Re: Calculed field inside conditional branch

von Corentin Aurèle Wicht -

Dear Yannick,

This is indeed a tricky question and a weird behaviour of the calculated fields.

Overall, calculated fields always run, even when hidden by branching logic.

First of all, you should simplify the "sae_revasc_loc_tvr_all" field by using the default "Calculated field" format (instead of the @Calctext() Action Tag, since the output is a number, not a string):

Then, to work around the issue, you can enclose your calculation in an if statement (under "Calculation Equation"):

if([sae_type] = '3',if([sae_arm_1][sae_revasc_loc_tlr]="1","1",if([sae_arm_1][sae_revasc_loc_tvr]="1","1","0")),"")


Best,

C.

81 Wörter

Als Antwort auf Corentin Aurèle Wicht

Re: Calculed field inside conditional branch

von Yannick Faucherre -
Thanks for helping Corentin.

Yes, hard to figure out the difference between Calculated Field and @CALCTEXT, but now I'm aware of it :-)

Kind Regards

25 Wörter