We have two fields drillTime and drillDateTime.
Condition:
If there is a value in drillTime print drillTime or if it is null
Print drillDateTime
[#if dmd.drillTime??] ${dmd.drillTime!""} [#elseif dmd.drillDateTime??] ${dmd.drillDateTime??}
Above we used in template but its not working correctly.
Its printing drillTime if there is a value in it and if it is null its not printing drillDateTime.
Note: drillTime is text and drillDateTime is date and time type.
Discussion posts and replies are publicly visible
Please see this thread for a solution: community.appian.com/.../freemaker-condition-logic-not-working
Thanks for your reply but the link you provided is not helpful for me.
Hi vamsikrishnac0001,
In my understanding, when you are using an Else IF condition, you need to also provide an ELSE, can you please have a look in the code below and see if it can help you?
[#if dmd.drillTime?has_content] ${dmd.drillTime!""} [#elseif dmd.drillDateTime?has_content] ${dmd.drillDateTime??} [#else] Add the condition for the else [/#if]
Regards,
Acacio B.
Thank you very much Acacio Barrado
I have already figured out the code.
[#if dmd.drillTime??] [#if dmd.drillTime!=""] ${dmd.drillTime!""} [elseif dmd.drillDateTime??] ${dmd.drillDateTime!""} [/#if] [/#if]