Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Display Earliest and Latest Date from Set of Dates

Avatar

Avatar
Validate 1
Level 1
redbaron07
Level 1

Like

1 like

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
redbaron07
Level 1

Like

1 like

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
redbaron07
Level 1

09-06-2016

The form I am working with in ES4 has a dynamic table with the ability to (1) add rows  - lets call these master rows-  and (2) add rows within a subform on each of those master rows - lets call these child rows.  Each of the child rows within a master row contain dates.  I would like to calculate the Sum of the number of dates between the earliest and latest dates specified in the child rows date fields for each master row. 

How would I go about having ES4 look for the earliest and latest dates?  Any scripting ideas?


Thanks in advance!

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Applaud 5
Level 1
alassir
Level 1

Likes

0 likes

Total Posts

17 posts

Correct Reply

2 solutions
Top badges earned
Applaud 5
Affirm 1
View profile

Avatar
Applaud 5
Level 1
alassir
Level 1

Likes

0 likes

Total Posts

17 posts

Correct Reply

2 solutions
Top badges earned
Applaud 5
Affirm 1
View profile
alassir
Level 1

09-06-2016

Hi redbaron07 ,

I guess that collecting the dates (in the specific column) in an array and then count the items should provide the information you Need. If you need information about the first and last date, just sort the array (ascending or descending). I don't know if this is the right way to do it, but I would give it a go (though I cannot give you the JavaScript or formcalc code, as I am not that firm in coding )

Regards

Dietmar

Avatar

Avatar
Validate 1
Level 1
redbaron07
Level 1

Like

1 like

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
redbaron07
Level 1

Like

1 like

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
redbaron07
Level 1

09-06-2016

Was thinking perhaps using formcalc Max( ) and isoDate2Num( ) conditions may work, however I've had trouble wrapping my head around how it would work in a dynamic table.