Jump to content

Empty Container Field Replace with text?

This topic is 6523 days old. Please don't post here. Open a new topic instead.

Recommended Posts


I would like to make a script which would allow me to insert text into a container field for a container field when there is an empty container field. I would like a script to go to each record and determine if the container is empty and if so replace it with text.

Is this doable.



Version: v6.x

Platform: Mac OS X Panther

Link to comment
Share on other sites


Instead, create a calc field ContainerMessage, case(isEmpty(container, "This field is empty"). Format not to allow entry, make it transparent, and put it over the top of the container.

Link to comment
Share on other sites

Hi Stan,

It is possible, however the text will have to be in vector graphic form (and therefore not directly editable) in order to be stored in the container.

How I suggest that you go about it is:

1. Go into layout mode, select the text tool and type the text that you want to place into the empty containers.

2. Create a global container field called 'gVectorText', then copy the text from layout mode, go to browse mode and paste it into the gVectorText field.

3 Create a script along the following lines:

Show All Records

Go to Record/Request/Page [First]


If ["IsEmpty(YourContainerField)"]

Set Field ["YourContainerField", "gVectorText"]

End If

Go to Record/Request/Page [Exit after last, Next]

End Loop

Your default text will then appear in all of the container fields which were previously empty, but existing container field contents will not be disturbed.

If you want any new records to start out with the text appearing in the container field, you'd need to set an auto-entry calc to reference the gVectorText field, on your container field. cool.gif

Link to comment
Share on other sites

This topic is 6523 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.