since ‎05-05-2010
‎10-12-2019
KAKristensen
Level 1
Re: Remove instance and hide subform
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
It seems to work.You're wonderful Thanks a lot.

Views

179

Likes

0

Replies

0
Re: Remove instance and hide subform
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Hi GeneveXThe parenthesis didn’t change anything. So I have tried using a variable. Just a simple statement to start with, to see if I could identify the number of instances. And here seems to be a problem.I put a statement in a button that returns a message box. var nPerson1 = Personer.Person1.instanceManager.count if (nPerson1==0) { xfa.host.messageBox("There are no instances"); } else { xfa.host.messageBox("There are more instances"); }It works fine if there are instances, but if there are no...

Views

150

Likes

0

Replies

0
Remove instance and hide subform
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Hi everybodyI have an issue with the instance manager.I have a repeated subform containing a delete button. The delete action works fine until I delete the last instance as I want the action, not only to delete the last instance, but also to hide the entire subform.I use this script on the click event:_Person1.removeInstance(this.parent.parent.index);I tried to put this on the MouseUp: (found it here: http://forums.adobe.com/message/4137110#4137110)if (this.parent.parent.instanceIndex == this.pa...

Views

1.5K

Likes

0

Replies

4
Re: Replace Line Feed a field with imported data
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Hi,I tried - it didn't work. So we have desided to deal with the new line issue prior to import.Thanks anyway, Niall. 🙂

Views

110

Likes

0

Replies

0
Replace Line Feed a field with imported data
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Hi, I’m trying to replace a line feed in a form field where data is imported to the field.I can make the replace function work when typing into the field, but I can’t figure out how to make it work on imported data.This is the script I use:if (xfa.event.newText.match(/[\n]/) ){xfa.event.change = "LF"} Regards,Kirstine

Views

530

Likes

0

Replies

2
Re: Error in encoded data in 2D barcode
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
I have now been able to reproduce the error. The data get encoded wrong when the form is filled out in Adobe Reader 8. (Or at least in Reader 8.2 which is the version I have for testing).The easy way out for me would be to ask all the clients to upgrade Adobe Reader but that is not practically posible, as we have thousand of clients using this form. Would it be posible to script my way out of this?Kirstine

Views

193

Likes

0

Replies

0
Re: Error in encoded data in 2D barcode
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Steve,The format in the barcode i delimited.Kirstine

Views

196

Likes

0

Replies

0
Error in encoded data in 2D barcode
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Hi, I have been met with a strange problem. I have a form with a 2D barcode. The barcode is a pdf417 barcode and the character encoding is ISO-8859-1.Often the field data include special characters as Æ – Ø – Å – Ü Most of the time everyting is fine. But now and then (I guess one in a thousand) it seams that the encodeding of the special characters get wrong. e.i in the form field the data is ”Ørskov” but the barcode data says ”Ãrskov”. I have not been able to reproduce the error in house but I ...

Views

3.5K

Likes

0

Replies

3
Re: Insert an additional character to a text field value
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
I found a useful script here which made it posible for me to make the function I wanted.var myRegex = /\d{6}[a-zA-Z]{4}/;if (this.rawValue != null || this.rawValue != '') if (this.rawValue.match(myRegex)){ var nChoice = xfa.host.messageBox("Did you mean 999999-AAAA?", "Messagebox title",2,2); if (nChoice === 4) { function isEmpty(str) { if(str == null || str.length == 0) { return true; } return false; } try { var vEID = this.rawValue; if (!isEmpty(vEID)){ this.rawValue = vEID.substr(0,6)+"-"+vEI...

Views

107

Likes

0

Replies

0
Re: Making rawValue text data appear as Upper Case, Sentence case etc
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Useful script. I was wondering if it is posible to extend the script to set each first character of a word to upper case and the rest to lower case, if there are several words in the field i.e. ”james brown” will be set to ”James Brown”and “JAMES BROWN” wil be set to”James Brown” I tried this:uC.substr(0,1).toUpperCase()+""+uC.substr(1).toLowerCase();But this only sets the first character to upper case and the rest of the field to lower case. How do I acces the next word?Kirstine

Views

480

Likes

0

Replies

0
Re: Insert an additional character to a text field value
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
I could, if I was shure the input always would match that pattern but I can’t be. Most inputs will match the pattern 999999-AAAA but the field should be open for all other input patterns as well.

Views

105

Likes

0

Replies

0
Insert an additional character to a text field value
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
How do I make a function to insert a character into the middel of a text?I want something like this:The user types “999999AAAA” and leaves the field. A messagebox asks “did you mean 999999-AAAA?”, the users choose “yes” and a hyphen is inserted in the text.I have made a regex to look for the “999999AAAA” and a messagebox but how can I change the field value to have a dash in the middle?var myRegex = /\d{6}[a-zA-Z]{4}/; if (this.rawValue != null || this.rawValue != ''){ if (this.rawValue.match(my...

Views

788

Likes

0

Replies

4
Re: pre print problems
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
After som e-mailing Paul gave me this solution:"comment out the xfa.host.print command and put the command app.execMenuItem("Print") this will work on your button (it is actually hitting the Print command in the Acrobat menus.)"And he also wrote:"Ok I figured this out ......It has to do with the order that things are happening .....User clicks the print button and casues the click event to fire.Your code gets interpretted. The xfa.host.numPages -1 gets interpretted and returns the numof pages in...

Views

186

Like

1

Replies

0
Re: pre print problems
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Hi paulI use Acrobat Pro 9.4.5 but I have tested the form in Reader 10.1.1 on a virtual machine as well.I have tried to set the template target version to 8.1 and 9 but that didn’t make any difference.However, I think I have come a bit closer to what happens. When I use ctrl+p the print range in the printer settings menu is set to Print Range = All.But when I use the print button (I use LiveCycles standard print button) the printing range is suddenly set to Print Range = Pages: 1I even made a ne...

Views

141

Likes

0

Replies

0
pre print problems
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Hi, I have come across a strange problem.I have a form with multiple pages, some are visible on the screen and some are hidden but should print. I thought it would be rather simple to set the visiblitiy to present on prePrint and hide the pages again on postPrint.But, and here comes the problem, if I use the print button the hidden pages are set to visible on the screen but they don’t print. If I use ctrl+p instead the pages are set to visible on the screen and do print. Why??I tried to set the ...

Views

1.7K

Likes

0

Replies

4
Re: How to show a field value and a message text in a message box
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Wonderful Thanks a lot.Kirstine

Views

148

Likes

0

Replies

0
How to show a field value and a message text in a message box
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
HiI have made a message box that shows the value of a text field when a button is clicked. I would like to add some message text to the message box as well, so that my message box will show something like:You have entered this data: "textField value"This script works to show the text field value but I cannot figure out how to combine it with an ordinary message box text message. I have tried various combinations of () and “ “ but no luck.if (TextField1.rawValue != null){xfa.host.messageBox(TextF...

Views

1.1K

Likes

0

Replies

3
Re: How do I access fields in instances and compare value?
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
This is just for the record.After some testing I discovered that my code only works if there is the same value for KtNr in instances right after one another, i.e. number 2 and 3 and not number 2 and 4.I changed my script to be more like the one Malcolm suggested and it looks like it works.var nEffekt1 = subform1.MyInstance.instanceManager.count if (nEffekt1>1){for (var i=0; i

Views

130

Likes

0

Replies

0
Re: How do I access fields in instances and compare value?
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Hi Malcolm Thanks for your answer. I couldn’t make it work, but it let me in the right direction. This is how I managed to solve my problem: if (subform1.MyInstance.instanceManager.count>1)//to check if the form has more than one instance{if(xfa.resolveNode("subform1.MyInstance ["+(subform1.MyInstance.instanceManager.count-1)+"].KtNr").rawValue == xfa.resolveNode("subform1.MyInstance ["+(subform1.MyInstance.instanceManager.count-2)+"].KtNr").rawValue) { xfa.host.messageBox("Error"); }else{ xfa.h...

Views

132

Likes

0

Replies

0
How do I access fields in instances and compare value?
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
I use the instance manager to add subforms to a form. In the subform I have a field “KtNr” and I would like make a warning if the same data has been typed in this field for more than one instance.I tried this code on the validate event of the field “KtNr”, but it does not work.var subDetail = subform1.reolveNodes("MyInstance[*]");for (i=0; i

Views

932

Likes

0

Replies

3
Value of empty fields in the barcode
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
HiI use a custom script for my barcodes in a form with multiple instances and it works all right. There is just one little thing.Empty field values get encoded to the barcode as ”null”. How do I change that to be just empty? The script I use looks like this://{{Start Generated Content//var is705ViewerRequired = false;//End Generated Content}}// function encodeBarcode() { var str = fieldName1.rawValue + "|" + xfa.resolveNode("subform1[" + this.parent.index + "].fieldName2").rawValue + "|" + xfa.r...

Views

1.3K

Likes

0

Replies

2
Re: Order of data in barcode
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Hi ChrisI define my collection in the Value tab in the Object panel and let LiveCycle do the scripting.Kirstine

Views

66

Likes

0

Replies

0
Re: Error in the search function in support forums
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Wonderful.Now I get all the results I expected.Suppose they have changed the default search options...K

Views

104

Likes

0

Replies

0
Re: Error in the search function in support forums
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Hi NiallI wasn't aware that there was a forum for forum issues.Thanks.Kirstine

Views

100

Likes

0

Replies

0
Error in the search function in support forums
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
It is no longer posible to search the forums for specific key words. I usually use the search function a lot. Nov tt looks like the it only search people and not the forums.I don't know where to report this error that's why it comes here.Kirstine

Views

910

Likes

0

Replies

4
Re: Order of data in barcode
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
I suddenly noticed that the orde of tha data is defined by the order in which I add the fields to my collection. Therefore: new collection and pick the field in the wanted order.Kirstine

Views

96

Likes

0

Replies

0
Re: A FormCalc Message Box question
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Paul,Such a little thing and yet so importent. It works.Radzmar I like your script because I don’t have to referre to my field by its exact name. (I may change the name of the field and forget all about the script) Thanks to both of you.Kirstine

Views

650

Likes

0

Replies

0
Re: A FormCalc Message Box question
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Hi Paul,I followed your advise but it doesn’t seem to change anything. And yes I am on the exit event. form1.#subform[0].TextField1::exit - (FormCalc, client) if(xfa.host.messageBox("Do you want to change the field value?", "Warning", 2, 2)=="4")then xfa.host.setFocus(TextField1)endif Kirstine

Views

429

Likes

0

Replies

0
A FormCalc Message Box question
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
Hi there,I am making message box in formCalc and I would like to set the focus back to the field when the user choose ”yes” .form1.#subform[0].TextField1::exit - (FormCalc, client)if(xfa.host.messageBox("Do you want to change the field value?", "Warning", 2, 2)=="4")then xfa.host.setFocus($)endif I can make the function work in JavaScript but not in FormCalc. Can some tell me whats wrong? It has to be FormCalc as the message box will pop up at the end of a long complex calculation that I didn’t ...

Views

5.1K

Likes

0

Replies

5
Re: print multiple pages
Avatar

KAKristensen

KAKristensen
- Adobe LiveCycle
HiI had hoped it was posible to control the printing more detailed. But the show/hide extra pages might be a solutionbetter than the one I was able to come up with.Kirstine

Views

289

Likes

0

Replies

0
Likes given to
Likes from