on 06-22-2020 4:32 AM
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:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
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
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.