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

Not getting parent group item

Engaged ,
Jan 04, 2016 Jan 04, 2016

Hi All,

I need help to select parent grouped item by selecting a text frame within group item. Here is what I am trying.

1. Searching a Paragraph style using script (note this paragraph style always available within grouped item)

2. Selecting searched text

3. using .parent code to go to grouped item

Problem is when I am targeting .parent item it's going to document instead of group item. Please help me to resolve this issue.

Thanks,

Shonky

TOPICS
Scripting
703
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 05, 2016 Jan 05, 2016

Hi,

It all depends on the way you're targeting a parent:

text.parent(Story).parent ==> Document

text.parentTextFrames[0](textFrame).parent ==> could be a Group if grouped.

Jarek

Translate
Engaged ,
Jan 04, 2016 Jan 04, 2016

Hi All,

I need expert advice on above issue. It will appreciate if anyone help here.

Thanks,

Shonky

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 05, 2016 Jan 05, 2016

Hi,

It all depends on the way you're targeting a parent:

text.parent(Story).parent ==> Document

text.parentTextFrames[0](textFrame).parent ==> could be a Group if grouped.

Jarek

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
People's Champ ,
Jan 08, 2016 Jan 08, 2016

Be aware that text.parentTextFrames[0] will throw an error if text is hidden (overflowing).

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
Engaged ,
Jan 21, 2016 Jan 21, 2016
LATEST

Thanks Jerek, it worked!

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