Jump to content
Server Maintenance This Week. ×

How to replace one field with another at runtime?


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

Recommended Posts

  • Newbies

I am a week-old fmp-man and I have a problem

I have several fields in my database that are not shown in the layout. There is a set of radio buttons. Depending on which is clicked, I wish to display a given field.

Is this possible?

What are the script steps?

I'd be grateful for any guidance

Link to comment
Share on other sites

quote:

Originally posted by sridharandv:

I am a week-old fmp-man and I have a problem

I have several fields in my database that are not shown in the layout. There is a set of radio buttons. Depending on which is clicked, I wish to display a given field.

There are a couple of ways to accomplish this.

One is to have multiple layouts, and scripted buttons over the radio buttons. The scripts would simply take you to the approriate layout based on which button was clicked. This is more difficult to setup and maintain, but gives you total flexability over the layouts displayed.

Another option is to use relationships to show/hide fields. Basically you setup a calculated field for each option that you want. Make that field = radio button choice (i.e. your radio button options are A, B, C. Setup calcs as ShowOptionA = "A", ShowOptionB = "B" and ShowOptionC = "C"). Then setup relationships from DataEntryField to each of the "ShowOption..." fields. Finally create small 1 line portals on your layout, big enough to hold the field that you wish to show.

When option A is selected the field in that portal will be displayed. The portals cannot be touching each other or any other layout elements, so this is a little restrictive in what you can accomplish, but it works.

I am sure that you can find an example of the above on www.databasepros.com site.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

Link to comment
Share on other sites

This topic is 8558 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.