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.4K

    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

    581

    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

    581

    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.1K

    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.1K

    Likes

    2

    Replies

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

    Type

    Questions

    Views

    782

    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

    813

    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

    802

    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

    802

    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

    802

    Likes

    0

    Replies

    0
Sort by
  • Recently earned
  • Unearned first
  • A-Z
  • Z-A
Give Back 400 8/10/21 Earned by 115 People
Give back 300 8/10/21 Earned by 160 People
Give Back 200 8/10/21 Earned by 268 People
Ignite 5 8/10/21 Earned by 5,233 People
Give Back 100 8/10/21 Earned by 465 People
Give Back 50 8/10/21 Earned by 872 People
Give Back 25 8/10/21 Earned by 1,798 People
Ignite 3 8/10/21 Earned by 9,550 People
Give Back 10 8/10/21 Earned by 4,419 People
Give Back 5 8/10/21 Earned by 8,735 People
Ignite 1 8/10/21 Earned by 38,859 People
Give Back 3 8/10/21 Earned by 14,035 People
Give Back 8/10/21 Earned by 34,301 People
Validate 1 4/29/21 Earned by 15,838 People
Boost 5 4/26/21 Earned by 6,648 People
Boost 3 4/26/21 Earned by 10,007 People
Boost 25 4/26/21 Earned by 1,676 People
Boost 10 4/26/21 Earned by 3,760 People
Boost 1 4/26/21 Earned by 21,416 People
Applaud 5 4/26/21 Earned by 5,769 People
Applaud 25 4/26/21 Earned by 1,159 People
Affirm 50 4/26/21 Earned by 243 People
Affirm 5 4/26/21 Earned by 1,111 People
Affirm 3 4/26/21 Earned by 1,664 People
Affirm 25 4/26/21 Earned by 402 People
Affirm 10 4/26/21 Earned by 683 People
Affirm 1 4/26/21 Earned by 6,093 People
Unlock Earned by 145 People
Unlock 2 Earned by 8 People
Establish Earned by 4,509 People
Validate 10 Earned by 691 People
Validate 25 Earned by 160 People
Validate 50 Earned by 41 People
Validate 100 Earned by 23 People
Validate 250 Earned by 13 People
Validate 500 Earned by 7 People
Validate 1000 Earned by 6 People
Validate 2000 Earned by 3 People
Applaud 50 Earned by 524 People
Applaud 100 Earned by 234 People
Show more