Help with Form Calc

Avatar

Avatar
Boost 1
Level 1
AmyC513
Level 1

Like

1 like

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
AmyC513
Level 1

Like

1 like

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
AmyC513
Level 1

24-06-2015

I have a performance evaluation where I am trying to calculate the total number of "exceeds ratings". I am using the following script and it works for a single field. I am now trying to calculate the total number of exceeds for multiple fields.  this.rawValue is my calculating field.  FieldName is the field the rating is entered. if the number entered is < 36 there should be no +1. So in other words, if I have 4 ratings entered that are > 36 my calculating field should say 4.  This may be simple for most but I do not do this to often. Please help. Thank you!

         if (FieldName > 36) then

this.rawValue = + 1

         endif



Amy

Accepted Solutions (0)

Answers (7)

Answers (7)

Avatar

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct reply

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

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
Level 4

26-06-2015

t=t+1

Avatar

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct reply

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

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
Level 4

26-06-2015

FormCalc doesn't recognize the =+ operator. You'll have to write it out. FormCalc will treat it as t = "+1" and output that at the end.

Avatar

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct reply

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

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
Level 4

26-06-2015

Since each row has different information, I'll presume they are also named differently. Something like taxCollectorCustomerSatisfaction.tfMid and telephoneSurvey.tfMid for the first two rows. Whatever you called them, just make sure you're using the row name and cell name in your script.


var t=0


if (taxCollectorCustomerSatifaction.tfMid > 36) then t=t+1 endif


if (telephoneSurvey.tfMid > 36) then t=t+1 endif


//more lines for the rest of the table


t


Avatar

Avatar
Boost 1
Level 1
AmyC513
Level 1

Like

1 like

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
AmyC513
Level 1

Like

1 like

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
AmyC513
Level 1

26-06-2015

Thank you, please forgive me for sounding ignorant, but this is only the second form I've built using FormCalc and LiveCycle.

How exactly would I need to write it out. That is the part I don't know.

Avatar

Avatar
Boost 1
Level 1
AmyC513
Level 1

Like

1 like

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
AmyC513
Level 1

Like

1 like

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
AmyC513
Level 1

26-06-2015

Thank you for trying to help...it still will not calculate and quite possibly because I am not doing something right. I tried selecting FormCalc and got an error. I didn't get an error with JavaScript but it would not calculate.

var t=0

if (CustSatisfaction1.tfMid > 97) then t=+1 endif

if (TelephoneSurvey1d.tfMid > 97) then t=+1 endif

t

Avatar

Avatar
Boost 1
Level 1
AmyC513
Level 1

Like

1 like

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
AmyC513
Level 1

Like

1 like

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
AmyC513
Level 1

26-06-2015

This is my table...see the third line up from the bottom...there are three small boxes, each box should represents Exceeding, or Achieving or Below. Each box should add the Mid Year Results from above. So in other words, if there are 5 scores entered above that are > 97, then the number 5 should be entered in the small box below.

781151_pastedImage_0.png

Avatar

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct reply

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

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
Level 4

24-06-2015

Are your other fields part of a table? If not, you may have to call each of them individually. Something like:


var t = 0


if (field1 > 36) then t=t+1 endif


if (field2 > 36) then t=t+1 endif


if (field3 > 36) then t=t+1 endif


if (field4 > 36) then t=t+1 endif


t