Hi,
Basically i want to bind to a field in the XML that its 13 characters long but i only want to show the last 4 characters.
Anyone knows how to configure the data binding so it only displays a portion of the chain?
Views
Replies
Total Likes
I'm not sure if it would work for you, but you could try using a picture clause. Look at the XFA specification (Ch. 26) for some examples.
Views
Replies
Total Likes
Hi,
I think you might end up having to use the calculate event to set the value (using $data.resolveNode(...).value).
Are people able to update the value or is it read only?
Regards
Bruce
Views
Replies
Total Likes
Hi Bruce,
Its read only. Im not very familiar with LiveCycle so I trying to figure out if the bind value read is as follows: 202356250123
I want to show the value in 2 fields; 1 showing the first 9 characters and second one showing the last 4 so the label appears as follows:
Thanks and kind regards
Ario
Views
Replies
Total Likes
Hi Ario,
If you were to make the SFC field hidden, then in the calculate event of the first field put;
SFC.rawValue.substr(0,9)
and the second field put;
SFC.rawValue.substr(-4)
Regards
Bruce
Views
Replies
Total Likes
Thanks for the Quick Response Bruce
I have created the following event and changed the field to invisible but the output its blank. Maybe im in the wrong calculate event or the script its incorrect?
Thanks and kind regards
Views
Replies
Total Likes
You should put the code in the calculate event of the field with the 9 characters and the other in the field with 4 characters. The code I gave was JavaScript not FormCalc.
Can you post a link to your form so we see whats going on.
Regards
Bruce
Views
Replies
Total Likes
Hi ,
See attached form, basically the 2 fields are binding to the same data but in one field im trying to show the first 9 characters and in the second field we are trying to see the last 4 characters
The barcode itself its just going to present a 2D datamatrix code of the binding field.
Thanks and kind regards
Ario
Views
Replies
Total Likes
Hi Ario,
There's nothing attached, can you try loading your form onto Google Docs (or similar) and adding a link here.
The 9 and 4 character fields should not be bound to anything, they will get there value from the calculate event.
Regards
Bruce
Views
Replies
Total Likes
Hi Bruce
I have uploaded the file in google docs as public so you should be able to access it now.
https://drive.google.com/file/d/0B7x-xbDNuRA1Tm5GNFRubEtVY1k/edit?usp=sharing
So both fields are binding to the same field but in the first one I want to show the start of the chain (9 characters) and the second field I want to show the last 4 characters
Sorry for such basic questions, im just starting to get familiar with this software package
Thanks and kind regards
Ario
Views
Replies
Total Likes
Hi Ario,
Try removing the binding and add the following in the calculate event, not sure which one has the 9 characters and which the 4.
But for the 9 characters;
$data.resolveNode('PrintContent.sfcPrintingData.sfc').value.substr(0,9)
and for the 4 characters
$data.resolveNode('PrintContent.sfcPrintingData.sfc').value.substr(-4)
Regards
Bruce
Views
Replies
Total Likes
Hey Bruce, that worked very well. Changed slightly bit the code.
Views
Replies
Total Likes
Hey Bruce, that worked very well. Changed slightly bit the code.
Thank you very much for the help
Ario
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies