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

Posted by: vincent.boyer.ucf on 16 November 2022, 12:00 pm EST

    • Post Options:
    • Link

    Posted 16 November 2022, 12:00 pm EST - Updated 16 November 2022, 12:10 pm 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 17 November 2022, 7:34 am 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, 11:22 am EST - Updated 17 November 2022, 11: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 18 November 2022, 1:50 am 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