Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Add some hours fields ?

Avatar

Level 2

Hi,

I've Livecycle Designer 8.0 and I'm not a coder

I've got a problem that I can't resolve by myself and the F1 button.

I've somme fields with HH:MM (monday to friday) and a calculate field who add these entries.

eg: M >02:00           T> 02:00                W > 02:00            T> 02:00             F> 01:30                => Total : 09:30

I can't do the calculation by LC

I can't even choose the right event to begin to code.

Pls help the poor designer girl who am I !

Thanks a lot

Nath

4 Replies

Avatar

Level 2

I've  made a button to execute the calculation of the amount.

On click :

formulaire1.form.id_candidat.Tableau1.r2.c7.rawValue = Sum(formulaire1.form.id_candidat.Tableau1.r2.c2 , formulaire1.form.id_candidat.Tableau1.r2.c3)

Why the result is "0" ?

Avatar

Former Community Member

You will have to parse the fields to get to a common unit (minutes) before you can add these times together. Then divide by 60 to get the number of hours and the remainder will be the number of minutes left. This would be done on the calculate event of the Total field.

Here is an example.

There are other ways to do it but this is the simplest that I can think of.

Paul

Avatar

Level 2

Thanks a lot ! It's works perfectly