Skip to main content
Allison Hetrick
Participating Frequently
September 14, 2022
Answered

Is there a way to auto populate numbers if something is entered into a specific field?

  • September 14, 2022
  • 1 reply
  • 2185 views

I would like the fields under the line # column to autopopulate 1,2,3,4... if something is entered into a field under the item # column. I've attached a screen shot for reference. The item #'s would vary.

This topic has been closed for replies.
Correct answer Nesa Nurani

Try setting field format to none.

1 reply

Nesa Nurani
Community Expert
Community Expert
September 14, 2022

As validation script of item# use something like this:

if(event.value)this.getField("Line field name goes here").value = 1;

else

this.getField("Line field name goes here").value = "";

Allison Hetrick
Participating Frequently
September 14, 2022

I tried the above but it isn't working. I get a JavaScript error when I test it in Reader. I've attached screen shots so you can also see the names of the fields.

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
September 14, 2022

Try setting field format to none.