Categories > TinyButStrong general >

How to show another field on if statement?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Kampret
Date: 2014-07-02
Time: 10:32

How to show another field on if statement?

can I show another field in if statement without [val]?

the example like this :
[dataJaminan.JaminanJenis.Urutan;if [val]==1;then [dataJaminan.KendaraanMerk];else [dataJaminan.NamaBilyet]]
By: Skrol29
Date: 2014-07-03
Time: 03:25

Re: How to show another field on if statement?

Hi Kampret,

Your example can work because in your case the sub-field will be merged before the parent field.
Nevertheless, you should protect the values of sub fields in case they merged value contain [, ] or '.

Example :
[dataJaminan.JaminanJenis.Urutan;if [val]==1;then '[dataJaminan.KendaraanMerk;strconv=esc]';else '[dataJaminan.NamaBilyet;strconv=esc]']