Not signed in (Sign In)

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthormateo
    • CommentTimeDec 22nd 2011
     
    How do i make the subject line have three different possible values? I tried the following but it doesn't work:

    IF( condition1, value_if_true1, IF( condition2, value_if_true2, value_if_false2 ))

    @IF(%%tfa_Subject%%="TP",@CONCATENATE("%%tfa_PN%%," (",%%tfa_StartDate1%%,")"," for ",%%tfa_Pleaseenteryourn1%%),@IF(%%tfa_Subject%%="TT",@CONCATENATE("TT: ",%%tfa_Starts%%," to ",%%tfa_Destination%%," (",%%tfa_StartDate1%%,")"),%%tfa_Pleasespecify%%))

    This is a variation on my two value subject line, which does work:

    @IF(%%tfa_Subject%%="TT",@CONCATENATE("TTs: ",%%tfa_Starts%%," to ",%%tfa_Destination%%," (",%%tfa_StartDate1%%,")"),%%tfa_Pleasespecify%%)

    I've had three options working before but only with two possible subject values:

    @IF((@OR(%%tfa_Subject%%="Question",%%tfa_Subject%%="Other")),%%tfa_MessageSubject%%,%%tfa_PackageName%%) from %%tfa_Pleaseenteryourn1%%

    Please advise, thanks.
    • CommentAuthordbuschho
    • CommentTimeDec 23rd 2011
     
    Hello Mateo,

    If you're still having trouble, this might be better handled in a support request, but let me take a crack at here for anyone who comes along:

    1. It looks like you're getting a bit tripped up on matched quotes syntax. Here in your original two value line:

    @IF(%%tfa_Subject%%="TT",@CONCATENATE("TTs: ",%%tfa_Starts%%," to ",%%tfa_Destination%%," (",%%tfa_StartDate1%%,")"),%%tfa_Pleasespecify%%)

    You get it right, but in the three value:

    @IF(%%tfa_Subject%%="TP",@CONCATENATE("%%tfa_PN%%," (",%%tfa_StartDate1%%,")"," for ",%%tfa_Pleaseenteryourn1%%),@IF(%%tfa_Subject%%="TT",@CONCATENATE("TT: ",%%tfa_Starts%%," to ",%%tfa_Destination%%," (",%%tfa_StartDate1%%,")"),%%tfa_Pleasespecify%%))

    You've got what looks like an extra quote to me:
    @CONCATENATE("%%tfa_PN%%

    I think should be:
    @CONCATENATE(%%tfa_PN%%

    Excel style syntax can be confusing.

    See if that works any better for you.

    Happy to help,
    Drew
    FormAssembly.com Support
    • CommentAuthormateo
    • CommentTimeJan 4th 2012
     
    oops, overlooked that extra quotation mark. Thanks