cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot hide a QR Code in Adobe Form even when no value

Mithun_Kumar
Active Participant
0 Kudos

Hi Friends,

I've a simple QR code in an Adobe form, and I want it not to print when the value in the binding field is empty. Such a simple thing to do, but it's just stuck, and doesn't hide at all.

I've tried all the different ways I know, and as suggested in the questions

But none of those ways work for me. The QR code still gets printed, and when scanned by the mobile, shows empty data.

Does anyone has any further ideas, on how to get it off, when there's no value?

Some screenshots attached for my scenario...

Empty Output:

Mithun_Kumar
Active Participant
0 Kudos

What's most surprising is... Even if I enter code like this, the QRcode still shows in the output.

 data.#pageSet[0].Page1.Border.Box.GV_QRPKKEY::ready:form - (FormCalc, client)
$.presence = "hidden"
$.presence = "invisible"

What's going on here?

Accepted Solutions (1)

Accepted Solutions (1)

PascalBremer
Advisor
Advisor
0 Kudos

Hi Mithun,

your scripting is wrong. Firstly in FormCalc it is enough if you check for empty value via hasValue function. Secondly the OR operation in FormCalc only uses one vertical line.
(see: https://help.adobe.com/en_US/livecycle/11.0/DesignerFormCalcRef/WS92d06802c76abadb-32254d55129f5ee7c... )

This would transform your code to something like:

if (not hasValue($)) then
	$.presence = "hidden"
endif

So essentially the presence attribute is never overwritten.
In the future use integrated debugging options to check this.

If you Preview as Dynamic XML or interactive form:

xfa.host.messageBox("This is a message", "This is a title", 3, 1);

If you Preview as Static PDF:

xfa.log.message(0, "test message")

Your message will be written to the log tab: Menu->Window->Report (to enable the view).
Also any syntax error will be logged here.

Best regards
Pascal

Mithun_Kumar
Active Participant
0 Kudos

Thanks for the tip, Pascal.

However, in my case, it doesn't work even if I put the presence statement without any conditions (as i mentioned in the comment below the OP). In fact initially, I did try the exact condition in the script as you mentioned.

Any ideas, why the QR code just won't hide itself?

PascalBremer
Advisor
Advisor

Hi Mithun,
I could never replicate your issue, when I copy your second scripting into an empty form with a qr code, the qr code disappears in the preview.
There might be some side effects in play here. In order to check this:

- reduce your template to only the minimum
- make your template available to the public, so I it is possible to replicate the issue
- open a SAP incident so colleagues can check

Sorry, but I do not think I can check further here, as the functionality works in general.

Best regards
Pascal

Answers (0)