Template print

Hello,

I tried to configure the Excel template to print a name into a specific cell under a specific condition.

I found that I could use this statement:
{data:ifEQ(value):show(text):elseShow(alternative text)}

I has an text data of names in:
d.constructor_id.nickname
d.requestor.nickname

And I want to print the requestor only in cases when the constructor is empty. I tried something like this:
{‘’:ifEQ(‘{d.construct_id.nickname}’):show({d.requestor.nickname}):elseShow({d.construct_id.nickname})}
But the result inside the cell looks like this:
{‘’:ifEQ(‘’):show(Petr Pan):elseShow()}

I tried several other versions with null and ‘’ but with same result.

How the statetment should looks like to get on the output only the “Petr Pan” result?

Thanks,

Zdeněk

Please participate in similar syntax:
{data :len():ifLT(4): showBegin}

{data :len():ifLT(4): showEnd}

Hello,

I tried it, but with no success. I’ll do a little experimenting with this:

{d.construct_id.nickname:ifEM():show(d.requestor.nickname):elseShow(d.construct_id.nickname)}

But the result is in the case of empty d.construct_id.nickname is the d.requestor.nickname instead of the true data.

If I tried to put the result in the curly braces:

{d.construct_id.nickname:ifEM():show({d.requestor.nickname}):elseShow({d.construct_id.nickname})}

This appears in the cell:
{d.construct_id.nickname:ifEM():show(Petr Svoboda):elseShow()}

What could I do if I want to show the database data after the condition?

Thanks for the help, and I apologise for the delay caused by the holiday.

Zdeněk

Please participate in similar syntax:

1 Like

Hello,

This one works and the syntax looks like this:
{d.construct_id.nickname:ifEM():showBegin}
{d.requestor.nickname}
{d.construct_id.nickname:ifEM():showEnd}
{d.construct_id.nickname}

Thanks a lot for helping me :slight_smile:

Zdeněk