Jump to content
Server Maintenance This Week. ×

Custom Dialog Buttons Based on Related Field


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

Recommended Posts

Hi All,

I want to have a few options in a custom dialog based on a related field.  I've been able to successfully get only one option to work using If/Case function (based on the first related record), but the other option does appear.  Let me explain a bit more with an example:

 

TABLE A - fields: Primary Key

TABLE B - fields: Foreign Key, Menu Line Item

I want to have different buttons appear depending on the menu information returned.  I want to have a custom dialog button labeled according to what the relationship returns.  Let's say the first person, call her 'Hungry Henrietta', chooses "Appetizer, Entree and Dessert"  and another person, 'Slim Sam', chooses just "Entree."   When I want to go into Henrietta's order I want a dialog that pops up and says:

"Which Would you like to look at?"

 

Button Option One - Appetizer

Button Option Two - Entree

Button Option Three - Dessert

 

Meanwhile, if I want to go into Sam's order I want to see the following Dialog:

 

"Which Would you like to look at?"

 

Button Option One - Entree

 

The button choices would then perform a search on the backend and take me to a completely different third table, but I know how to do that I think.

I need these to be dynamically adjust position.  I'm also open to other methods - popovers or the like, but I'm not sure how I'd resolve that.

 

Thanks in advance for any help

 

 

 

 

Link to comment
Share on other sites

It's not a good idea to use a custom dialog for this, if only because it would be limited to three choices at most. A portal would be a much better choice, because it can show any number of rows (if necessary, through the means of a scroll bar). Just place a button in the portal to perform your script, with the parameter being the selected child's value.

Alternatively, you could make your selection using a drop-down list or a popup menu attached to a global field.

 

Edited by comment
Link to comment
Share on other sites

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