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

Calculate length of number/numeric field. (multiple 0's fail)

Community Beginner ,
Jan 23, 2023 Jan 23, 2023

Need to calculate length of  a field including any 0's

 

000231 should equal 6

 

a=this.getField("field1").value

app.alert(a.toString().length);

 

// only works with non 0 digits. 

 

 

TOPICS
Create PDF
354
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

correct answers 1 Correct answer

Community Expert , Jan 24, 2023 Jan 24, 2023

Use:

a=this.getField("field1").valueAsString;

 

Translate
Community Expert ,
Jan 24, 2023 Jan 24, 2023
LATEST

Use:

a=this.getField("field1").valueAsString;

 

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