Expand my Community achievements bar.

dcidev
dcidev
Offline
Type
  • All
  • Questions
  • Discussions
  • Ideas
  • Blogs
Filter by user contributions
  • Hi all,I'm wondering if anyone has figured out why after normally about 300-500 lines of JavaScript in a Script Object, sometimes the functions near the end are no longer recognized by the XFA processor when referenced ("TypeError: Scripts.myFunction is not a function"). When reordered, further up t...

    Type

    Questions

    Views

    1.5K

    Likes

    0

    Replies

    2
  • BEFORE the for statement.var name = this.rawValuevar initials = "";var wordArray = name.split(" ");if (wordArray.length==1)  initials=wordArray[0].substring(0,3);elsefor(var i=0;i<wordArray.length;i++){initials += wordArray[i].substring(0,1);}Townabr.rawValue = initials;Kyle

    Type

    Questions

    Views

    739

    Likes

    0

    Replies

    0
  • You can put:if (wordArray.length==1) initials=wordArray[0].substring(0,3);elseright before your for statement.Also, if you are using this for the purpose of changing province names into short form, I would recommend using a list with the official province codes (or you might have just been using tha...

    Type

    Questions

    Views

    739

    Likes

    0

    Replies

    0
  • Hey Anton,Yes, this.instanceManager.count happens to be the page number only because there is only one instance of your repeatable subform on every page. this(your subform) instanceManager(the instance processing object) count(how many instances of your subform there are).this.instanceManager.count>...

    Type

    Questions

    Views

    6.7K

    Like

    1

    Replies

    0
  • 1) Select your repeating subform and add a Conditional Break (Object>Pagination>Edit...).2) Enter this script: this.instanceManager.count>this.instanceIndex+13) Select Break: After and To: Top of Next Page4) Select OKKyle

    Type

    Questions

    Views

    6.7K

    Likes

    2

    Replies

    1
  • What if you try this.mandatory="error" instead?Kyle

    Type

    Questions

    Views

    944

    Likes

    0

    Replies

    0
  • OK...I did a few things...I got rid of all your static rows since they were all identical and made one dynamic repeatable row.That should be easier to manage and edit. To adjust the number of rows and the text in each row go into the myLists scripting object and you will see it is relatively self ex...

    Type

    Questions

    Views

    1.0K

    Like

    1

    Replies

    0
  • You may need to expand the scope of the conditional expression to include the table.Something like:this.rawValue=xfa.resolveNodes('Table.Row.[Cell1.rawValue=="1"]').length;That's without seeing your exact hierarchy.Kyle

    Type

    Questions

    Views

    1.0K

    Likes

    0

    Replies

    0
  • Ya it was a recipe by Bruce that really open my eyes to the power of SOM predicates. I use to think it was just for binding data until I saw him use it in the resolveNodes method. Better (and faster) than for loops.http://cookbooks.adobe.com/post_Drop_Down_List_Control_with_auto_complete__Searcha-18...

    Type

    Questions

    Views

    1.0K

    Likes

    0

    Replies

    0
  • You could also use SOM predicates in the resolveNodes method and place a one liner in the calculate event of each total field:this.rawValue=xfa.resolveNodes('DropDownList1.[$.rawValue=="1"]').length  //Counts all the fields named DropDownList1 with a value of 1Kyle

    Type

    Questions

    Views

    1.0K

    Likes

    0

    Replies

    0