0 votes

Hello,

I tried to use [$OnField("F_DANGEREUX", value="1", then="Dangereux")] in one of my document templates but it does not work. F_DANGEREUX is a boolean field.

If I write [$OnField("F_DANGEREUX", value="1", then="Dangereux", else="Non dangereux")], it will always return what is specified in the else, no matter if I write value="true", value="1", value=1 ... The then="xxxxx" is never returned.

Does anyone know what's the problem with this ?

Thanks by advance.

asked in Efficy/ Client side by (110 points)

1 Answer

0 votes

You miss the entity prefix before the field.

Assuming that the field F_DANGEREUX is part of DOCUMENTS, these commands should both work:

Generated with office add-in

[$OnField(`DOCU.F_DANGEREUX`, condition=`EQUAL`, value='1',then='Active', else='Closed')]

Simple version generated manually

[$OnField("DOCU.F_DANGEREUX", value="1", then="Active", else="Closed")]
answered by (7.2k points)
Thanks Kristof, will see that on Monday!
1,226 questions
1,495 answers
1,831 comments
328 users