Jump to content

Relating Fields within the same record?


zenman

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

Recommended Posts

  • Newbies

Can you relate 2 fields in the same record. Specifically how can I have input for Field one (Home Address), automatically transfer to a Field Two (Emergency Contact Address) without input into Field Two transfering back to Field One if the information is different?

Link to comment
Share on other sites

Try using a button labeled "Use Home Address", next to the Emergency Address entry field.

When the button is pressed, it runs a script:

IF (not isempty (Emerg_Addr) )

Show Message (Do you really want to overwrite your Emergency Address with your Home Address?), 1 =

No (default), 2 = Yes

IF (status (UserMessageChoice) = 1 )

Exit Script

End IF

End IF

Set (Emerg_Addr = Home_Addr) ** you only get here if Emergency Address is empty or if the user wants to overwrite.

Link to comment
Share on other sites

It sounds like you want the Emerg_Contact_Address to be the same as the Home_Address until a different emerg. address is entered.

If I'm right, then here's an idea that instead of a relationship uses a calculation, an Emerg_Address_Entry field, and a layout trick.

The entry field is a text field. The layout trick is that you make it opaque and place it under the Emerg_Contact_Address field. Make the latter transparent and disallow entry into the field.

Here's the calc:

Emerg_Contact_Address =

If (not IsEmpty (Emerg_Address_Entry), Emerg_Address_Entry, Home_Address)

If anything's been entered in the Emerg_Address_Entry field, then it uses that, otherwise it equals Home_Address. Voila, the whole process is invisible to the user, no buttons, no checkboxes.

Thanks to LiveOak for help with this one.

Link to comment
Share on other sites

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