Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have a State layout form which displays State records. I would like to create a 2nd form layout that displays records for Cities. The Cities need to display for the current State record that is displayed on the State layout form.

Any help will be appreciated.

Posted (edited)

- Build a relationship so each state record can see all its related city records

--- more info on this process if you need it:

----- state table has state field

----- city table has state field

----- relate the state fields to each other

- make your state layout

- make your city layout

- create a simple script that does go-to-related-record from the state to it's city collection, and which also displays the found set of related records in the city layout.

- tie your script to a button on the state layout.

Yer all set!

Regards,

Don Drake

Edited by Guest
Posted

Thanks for the advice, however:

This works when there are related records, but does not work if related records do not exist. Is there a way to load the foreign key in a new related record and commit the related record before the "Get Related Records" code executes?

Posted

Tom,

That's one way to go. Personally, I'd probably just add a little error check to the script to make sure the relationship is turning up some related records. In the case of the error condition just toss up a dialog. Then you don't have to deal with any extra records you might create in your method.

I'm a little bit rusty on the specifics right now... maybe the IsValid calculation will work in this case or perhaps you can do GetField on the related data and see if you actually got anything.

Regards,

Don Drake

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