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

Unselect Portal


LaurenKuhlman

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

Recommended Posts

So, I am sure someone will make me feel stupid here shortly by pointing out the obvious that I must be missing but all help is appreciated.

This is the what happens:

From a project profile screen a user clicks "Assign Project Contact." This button opens a new window, creates a record in the PROJ_CONTACT table and sets the _PROJECT_KEY to the corresponding PROJECT::)__KEY. Right, that was a mouthful. This new window shows a layout holding a portal with all the contacts (they can be filtered dynamically but thats not important here).

So now, the user has two options:

1. Choose a portal row and click OK in which case PROJ_CONTACT::B_CONTACT_KEY is set to CONTACT::__KEY from the corresponding portal row. This related record then shows up on the project profile.

2. Click Cancel which deletes the PROJ_CONTACT record.

Both options close the window.

I found a bug. If the user clicks a portal row and then clicks Cancel the related record (not the master record) is deleted. This is obviously bad. I do not want to go about deleting contacts and producing blank PROJ_CONTACT records.

I looked up the Delete Record/Request script step up in "Filemaker 9 Developer Reference" and it says this:

"If the step is performed without a dialog, the action automatically applies to the master record. If a portal row is selected and the portal is not set to Allow Deletion of Portal Records, the options to delete a record never appears."

The portal is set to not Allow Deletion of Portal Records. So, this isn't helpful. It is still happening.

[color:red]

Pretty much I want to just unselect the portal row before performing the delete. I couldn't figure out how to do that.

NOTE: There is a many-to-many relationship between PROJECT and CONTACT. PROJ_CONTACT just holds a _PROJECT_KEY and a _CONTACT_KEY to allow this relationship. The context of the pop-up window is PROJ_CONTACT.

ANOTHER NOTE: There is more error-checking that I didn't mention such as Close Window (red X) is overwritten to not allow, the front window is set to pause and remain in front, the user must have a portal row selected to click OK, etc. etc. Just FYI.

THIRD NOTE: The Delete Record/Request must be set to not display dialog. This system works for Web and Pro users.

Link to comment
Share on other sites

You can unselect a portal row (and pretty much anything else) by Go to Field[] with no field specified.

Commit Records[] has a similar effect - but you don't always want the side-effect of committing the record.

BTW, I prefer creating a link immediately upon selecting the contact, without needing to OK the choice.

Link to comment
Share on other sites

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