Jump to content

Can you remove a text frame if another text frame is empty?


Recommended Posts

Is there a way to remove a text frame if another text frame is empty? I'm creating a table of contents. Under each section (chapter) I have a text frame that will be removed if that section of the book is not chosen.
Link to comment
Share on other sites

I think the simplest thing is to just have the frame that you want to "remove" call out a rule, and if you don't want anything in the frame, just have the rule return nothing.


Or, you can name the frame, and then in OnRecordStart, you can do this to suppress it:

FindTextFrame("YourFrameName").suppress= true;

You could do this conditionally, based on whatever condition you want, e.g.:

if (!Field("Section"))
   FindTextFrame("YourFrameName").suppress= true;


FindTextFrame("YourFrameName").suppress= !Field("Section");

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...