World - Template - hide-block-if-not-contains

Posted by: vincent.boyer.ucf on 16 November 2022, 3:00 am EST

    • Post Options:
    • Link

    Posted 16 November 2022, 3:00 am EST - Updated 16 November 2022, 3:10 am EST

    Hi,

    I can’t get HBI-not-contains or HBI-not-equals to work

    here’s the template:



    here’s the result in pdf :

    You can see the value is good but the Hide block is not.

    I have “Salarie” and “SALARIE” (with upper) but hide-block-if-not-equals(“SALARIE”) hides the block … SALARIE is equal SALARIE .

    (Not-contains, same same)

  • Posted 16 November 2022, 10:34 pm EST

    Hi,

    Could you please provide a stripped-down sample? So, that we can investigate and assist you accordingly. A dummy sample would be helpful to investigate HBI-not-contains or HBI-not-equals.

    Best Regards,

    Nitin

  • Posted 17 November 2022, 2:22 am EST - Updated 17 November 2022, 2:23 am EST

    Hi,

    Here’s the docx template and the json data zipped

    GRAPECITY.zip

    var = JSOn from file

    doc.DataTemplate.Options.MissingFieldsHandling = DataTemplateMissingFieldsHandling.Relaxed;

    doc.DataTemplate.DataSources.Add(“ds”, var);

    doc.DataTemplate.Process();

  • Posted 17 November 2022, 4:50 pm EST

    Hi,

    Thanks for the sample.

    JFYI, you need to put the argument without Quotes(“”) in hide-block-if-not-equals:

    {{ds.Item.DataJson.InfosCarte.TypeCarteSalarie}:toupper():hide-block-if-not-equals(SALARIE)}

    Please refer the attached modified sample for the same: GRAPECITY_Mod.zip

    Best Regards,

    Nitin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels