Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help with javascript code

Participant ,
Jun 05, 2017 Jun 05, 2017

Guys, I need some help.

I am making a form where there is a column with actions taken and another column with the status of these actions, where it can be pending (blank field) or resolved (OK). I created a field of implemented actions (OK) and wanted a code in javascript that counted all the fields with "OK".
Something like .... if the field has ok he would count and give me the total of ok.
can you help me?

Abs,

Berg

TOPICS
Acrobat SDK and JavaScript , Windows
300
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 06, 2017 Jun 06, 2017

What have you tried? What happens?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 06, 2017 Jun 06, 2017

Good Morning.

In fact I ended up forgetting one detail. These two parameters I commented, will be through the drop down menu, where in the blank option, I would like the value to be "0" and when I select OK the value was "1" and then in a specific field, count all the lines that Contain the value "1" that would be all OK.
At the moment I have not done anything yet, as I am trying to study jvascript and thought about using the if and else command. I do not know if it would be the right one, so I asked for help in working out this code for me. So with this help, I will try to understand the syntax of the commands and try to proceed with others.

Regards,

Berg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 06, 2017 Jun 06, 2017
LATEST

Haven't used JScript with Adobe yet (I just joined for that reason), however the easiest method would be to sum the values, since you know they will be integers.  If you're planning on using more values later, you could use an offset system (eg "OK" is 1, "Wait" is 100, "Cancel" is 10,000 etc).

If..Else will also work, but I would only use this if you're using something like a for..each loop with a counter.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines