Categories > OpenTBS with DOCX >

Multiple block conditions

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: ErA
Date: 2015-02-25
Time: 17:58

Multiple block conditions

Hi all,

I have to put two conditions for a block. I know how it works for one but for two I have no idea.

For example in my DOCX I have:

[imago-adresses;block=begin;p1=[imago.personne.id];when [imago-adresses.id_usager]=[imago.personne.id]]
-    [imago-adresses.type_adresse]
o    Type de domicile : [imago-adresses.type_domicile]
o    Adresse : [imago-adresses.adresse]
o    Code postal : [imago-adresses.code_postal]
o    Ville : [imago-adresses.ville]
o    Pays : [imago-adresses.pays]
o    Téléphone fixe : [imago-adresses.telephone_fixe]
[imago-adresses;block=end]

I want to add a condition in my block on the [imago-adresses.type_adresse] but i have allready a when case in my block and I know that the logical operators are not working in OpenTBS.
So how i could do this?

Sincerelly,

ErA
By: Skrol29
Date: 2015-02-25
Time: 23:15

Re: Multiple block conditions

Hi ErA,

In case of a block having a complicated expression for the "when" condition then you have to use parameter "ondata" with a custom function that will perform the check at the PHP side and save it in a new column.
Then you can use this new column foe a simple expression in the "when" parameter.

See http://www.tinybutstrong.com/manual.php#html_block_prm_ondata
By: ErA
Date: 2015-02-26
Time: 09:04

Re: Multiple block conditions

Ok I'll try and I'll communicate about my results.

Thank's for the answer Skrol !