Skip navigation
Currently Being Moderated

Help with script

Jul 16, 2012 12:13 AM

Anyone know why this not working?

 

if(Table1.Row1.TextField1.rawValue !== null){

xfa.resolveNode("Table1.Row1[1].TextField1").rawValue = Table1.Row1.TextField1.rawValue

}

else if

(xfa.resolveNode("Table1.Row1[1].TextField1").rawValue !== null)

xfa.resolveNode("Table1.Row1[2].TextField1").rawValue = Table1.Row1.TextField1.rawValue

 

When I click a button I want the value from field1 row 1 to be entered in field 1 row 2. That works.

And if field 1 row 2 to is already filled I want the value from field1 to be entered in field1 row 3 and so on.

 

/ Anders

 
Replies
  • Currently Being Moderated
    Jul 16, 2012 9:58 AM   in reply to ubolrat

    Hi Anders,

     

    This is an example where FormCalc is easier, as you do not need to resolve the nodes (because FormCalc handle [1]).

     

    if (Table1.Row1[0].TextField1 ne null) then
              Table1.Row1[1].TextField1  = Table1.Row1[0].TextField1
    }
    elseif (Table1.Row1[1].TextField1 ne null) then
              Table1.Row1[2].TextField1 = Table1.Row1[1].TextField1
    endif
    

     

    Hope that helps,

     

    Niall

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 17, 2012 12:06 AM   in reply to ubolrat

    Hi,

     

    The script I proposed was FormCalc and should not have curly brackets in it. Check that the language is set to FormCalc.

     

    I would encourage you to get the full script working.

     

    Niall

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points