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

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

Recommended Posts

Posted

Howdy, howdy...

I need a script--using either a button or popover'd button--that will delete a portal row; I can't use a "stock" button where it's set to Single Step and Delete Portal Row because the client wants to keep the look and feel to the UI and not use FileMaker Pro's default windoids/messages, so it has to be custom. To compound the problem, it's a tabbed layout where each tab (of 7) has its own portal to a separate child table.

One problem is that because a user will click a button atop the portal row, it won't be selected so FileMaker Pro won't know the name of the child table beneath it...as far as I can tell, anyay.

I did create a very lengthy script that does work for seven children tables, but it's pages long...which belies my knack of finding the most arduous, lengthy, wordy way of accomplishing a programming task in the program. :S (Hey, everybody has a skill.)

TIA for your help.

Posted
3 minutes ago, WF7A said:

One problem is that because a user will click a button atop the portal row ...

Do you mean the button is outside the portal? 

 

14 minutes ago, WF7A said:

... it won't be selected so FileMaker Pro won't know the name of the child table beneath it...as far as I can tell, anyay.

Well, that depends on whether it's a button or a popover button. Clicking a button does not change the current selection, so it doesn't really matter if the button is outside the portal. If it's a popover, you will need some method to remember the active portal and the active portal row number - e.g. by running a script triggered on object enter.

Consider also what might happen if user clicks the button accidentally, when no portal row is actually active (but one might have been active beforehand).

 

Posted

Sorry I wasn't clear: the button is inside/directly over the portal.

In my current, overly verbose script, I use a button that hands off to separate popover button inside the portal that conntains a warning message and Cancel and Continue buttons so users can't accidentally delete portal rows. 

I attached the portion of the current script that shows two of the seven children tables; you can get an idea of how repetitive the code is. (The Delete Warning fields are flags so when a portal row is selected, its fields' contents turn red--through conditional formatting--after the initial script button is pressed, showing users which row they're about to delete.)

Screen Shot 5.png

Posted
1 hour ago, WF7A said:

Sorry I wasn't clear: the button is inside/directly over the portal.

I am afraid you're not being clear now. A button can be either inside the first portal row or outside it. If it's inside, it will be repeated for each row. If it's not repeated, then it's outside the portal for all intents and purposes. 

In any case, what I said earlier still applies: if it's a button, then clicking it will not change the current selection. If you're doing something in-between that will cause you to exit the current portal row (such as opening a popover), then Filemaker will not know which portal row to delete.

 

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