Looping through cell in table

Avatar

Avatar
Validate 10
Level 2
Jodi1725
Level 2

Likes

6 likes

Total Posts

113 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
Jodi1725
Level 2

Likes

6 likes

Total Posts

113 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
Jodi1725
Level 2

19-11-2015

Hi all!

I have been digging but can't find my answer.  I have a table that you can add rows to.  In the same cell in each row I have to validate if the number in the field starts with a 4 or 5 ( the number is a total of 6 digits long).  I have java script that validates the 4 or 5.  but I need to loop through all the rows for that cell. Right now just validates on the first row.

Help!

Thank you!

Jodi

var Grant = Main.PreApproved.Table1.Row1.Fund.rawValue

var GrantFund = Grant.charAt(0)


if  (GrantFund == 4 || GrantFund == 5).......

View Entire Topic

Avatar

Avatar
Validate 10
Level 2
Jodi1725
Level 2

Likes

6 likes

Total Posts

113 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
Jodi1725
Level 2

Likes

6 likes

Total Posts

113 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
Jodi1725
Level 2

31-01-2018

Hey Bruce!

I actually figured it out!  I used Loop Through Subform Instances  and used this code.

expenseReport.#subform[0].validate2::click – (JavaScript, client) 
var vItems = expenses.expense.all; 
for(i=0; i<vItems.length; i++) 

    if (vItems.item(i).description.rawValue == null) 
    { 
        xfa.host.messageBox("Missing description field"); 
        break; 
    } 

}

Took me a few tries to get it to work but it did Thanks!

Jodi