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

Adding another 0 before, when textfield contains 0 (00)

Explorer ,
Jan 23, 2019 Jan 23, 2019

Hello,

how can I represent my textfields which contains a 0 (zero) like this: 00  - to add a zero in front of.

I found on: Main Menu Layout > Numbering & Section options, but that's only for numbering the pages.

Greetz

761
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

Mentor , Jan 23, 2019 Jan 23, 2019

… And if you couldn't follow a really reasonable Barb's and Jane's suggestions due to whatever reason, this simple regex may be useful to double a zero which is the only character in a paragraph or text frame, in InDesign. Zeroes in action are colored for easy eye-catching:

zeroes.gif

Translate
Community Expert ,
Jan 23, 2019 Jan 23, 2019

In the GREP tab:

Find what: \b0\b

Change to: 00

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
Explorer ,
Jan 23, 2019 Jan 23, 2019

Thanks Peter,

Can I set that change only for certain textfields?

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
Mentor ,
Jan 23, 2019 Jan 23, 2019

It depends. What makes those 'certain textfields' special? Different formatting, applied style, some specific text before/after?

In Find/Change panel you can define Search scope as Document, Story, Selection… Is it of any help to you?

And what do you mean by a 'textfield'? Is it a cell in a table, a separate paragraph in a text frame, or what?

Some visual samples with what you have, and what are you after, would be a great help to understand.

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
Explorer ,
Jan 23, 2019 Jan 23, 2019

Hello,

to make it clear, it's about a 'normal' text field, the data for that certain textfield is filled by a csv. file (data merging).

My question is, can I set a change for just one field, and not for my whole document?

For instance: The textfield is filled with a 0 (zero). I wanna add another zero in front of a zero. (so: when my csv.file puts a 0 in my textfield, i wanna do the change from 0 too 00 in InDesign, and not change my csv.file directly.)

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
Community Expert ,
Jan 23, 2019 Jan 23, 2019

Hi Greetz:

Then why not correct the field in Excel so that the source file is correct prior to merging? Otherwise, you will have to make this correction each time you re-merge.

~Barb

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
Community Expert ,
Jan 23, 2019 Jan 23, 2019

Hi Greetz,

If you don't know how to do Barb's suggestion in Excel, you need to create a custom number format with "00" and apply it to your numbers. I tested it and it works when the Excel file is placed in InDesign.

  • On the Home tab, choose More Number Formats as one way to get to the Format Cells dialog box. I can't take a perfect screen shot of this because clicking it goes into the dialog box. It says "General" by default and is above the buttons that apply number styles.

  • On the Number tab, choose Category: Custom > for Type, enter 00, meaning always two digits and include the leading zero when necessary.


Jane

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
Mentor ,
Jan 23, 2019 Jan 23, 2019
LATEST

… And if you couldn't follow a really reasonable Barb's and Jane's suggestions due to whatever reason, this simple regex may be useful to double a zero which is the only character in a paragraph or text frame, in InDesign. Zeroes in action are colored for easy eye-catching:

zeroes.gif

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
Community Expert ,
Jan 23, 2019 Jan 23, 2019

Hi Greetz:

If there isn't a clear differentiation as per Winterm's question ^^, remember that Find/Change offers Change & Find button allowing you to visually review the situation before applying the change and moving to the next occurrence.

~Barb

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