A
|
Anapolis 2/15/2014 |
Boy I could use some help on this one. I have a multi-part form (3 parts) pertaining to sports, coaches and schools On the second part of the form, I gather the coachid and stick it in a $_SESSION variable. On the third part, I want to restrict a dropdown to only those schools that are in the same division that the coach is in. I will also need the user-selected value of this dropdown. I can create beautiful working mySQL queries that get the properly restricted list of schools for the dropdown, but then it gets awfully confusing for me as to where to put these query results. My questions are:
|
A
|
Anapolis 2/15/2014 |
I will just take one guess first and you can reply to that if it is useful. You don't say which version of Runner you are using which may make a difference. But, I have PHPRunner 7.1. I think the last couple of builds of Runner allow you to use a Custom View as a source in the EDITOR Lookup Wizard. Since you already have working queries then you just have to assign them to something "concrete" in PHPRunner. Make a Custom View based on the table that already exists where you get most of your values that you want in the dropdown. If it is missing a table then go to the QUERY View and examine the SQL tab to see the existing Custom View you just added. Modify it to contain all the conditions of your working query that you already have. Check the RESULTS tab to see if you are getting what you expect. The Query you say you already should now be the basis for the Custom View you have created. I always do a manual save of the whole project after making some important changes. [indent]Go Back to the EDITOR for the Add page you want to create a dropdown for. Click on the field where you want that Dropdown until the ADD view Editor pops up. I always select with a check mark the "Use different settings for all pages". Make sure you are on the ADD tab. Then go down the Options and select "LOOKUP WIZARD" At the top Select the Radio Button "Database table" At Table select from the available dropdowns the Custom View you created that has the query that "works". Use the "Link Field" to select the primary key id that will provide the "real", literal value that you want to save into this field once a row of data is selected. [/indent] [indent]Use the "Display Field" to Select the Pretty Words of text that describe that row of Value by descriptive terms. Then select the DROPDOWN button and keep it at "Multiline" 1 Click the "Test It" button. What pops up will show you the "Pretty Words" on top, and in the next line the literal value, the number, for instance, that is the True value you want to record into this field when the Add page is saved. [/indent] On top of all of this, the CREATE NEW QUERY option lets you go Directly to inputting a working query without having to choose from the Table dropdown. There are more options to discuss, such as whether you want the List and View pages to show the Numeric value as it exists in the field itself, or if you want the Pretty Words description to be seen as a "front" for the naked number id. I hope this is in the direction of what you are having a problem with.
|