This topic is locked

Show Hyperlink Based on Dropdown Option

9/21/2009 3:38:54 PM
ASPRunnerPro General questions
C
cdlamore author

I have three tables I am working with - The master table and two child tables. I want to have a drop down box or check box (I am open to changing to whatever works best) where the options are the two topics of the child tables. What I would like is that when they pick one of these two options a link or button or something appears that would allow them to create/edit the record in the child table.
More detail - the master table is the patient (expenctant/delivering mother) she is going to deliver either natually or c-section. There are lots more information based on which delivery method happens so I have them in seperate tables. I would like it if when the nurse/dr is entering the information regarding the birth that when they select delivery method it would only give them the option to access the edit/add form for the method
Tables -

Master - perinataldb

child - csectiondata

child - vaginaldata
Also make it so this would become available to them when they select the method not after they hit the submit at the bottom.
Can anyone help me with this. I have a feeling it is not that difficult but for some reason I cannot figure out what is the best approach to making this happen.

J
Jane 9/22/2009

Christie,
you can do the following:

  1. join master and details tables on the Edit SQL query tab and add fields from detail tables to the main add/edit pages.
  2. to update joined tables use Before record added/Before record updated events:

    http://www.xlinesoft.com/asprunnerpro/docs/update_multiple_tables.htm
  3. to hide/show fields from detail tables based on the selected delivery method use custom JavaScript code on the Visual Editor tab.

    Here is just a sample:

    http://www.asprunner.com/forums/index.php?/topic/6503-how-to-disableenable-controls-on-editadd-pages/