|
Stu author 4/6/2009 |
I decided to work it out and so I have a reply to help others In a Master/Detail schema the Master List contains a hyperlink to the detail records. In my Master table I have a field called "Company" but my Detail record hasn't got that field because I can "Show Master Info on Detail Page". But when I want to Add a New Detail record I know my ID Key is automatically transferred to the Detail record but how would I Reference the value of "Company" that was in my Master record that brought me to the Add. I don't know what Event I can place the code into, I just learnt I can do Code Snippets but don't know where to put some code for this, My guess is that somewhere I need something like: session("CompanySave")=dict("Company") and then pick up that session variable in the Detail page Add screen. I guess there is also a dal. way of referencing the value of "Company" by a query on the Master Key value. Either way telling me what to write and where to put it (nicely!). Would be appreciated. Using v 6.0 for stability. |
![]() |
jtksmith 4/9/2009 |
Stu, |
|
Stu author 4/10/2009 |
Jeremy, Stu, I'm still learning ASPRunner, so pleae forgive my ignorance. I've been visiting the forum a lot in the last few days trying to gleam from the many excellent questions and responses. By doing this, I'm trying to learn from those that were here before me as well as trying to avoid asking questions that have already been asked before. Your question seems very interesting to me but I'm not completely sure what you were trying to accomplish. I see you've already answered your own question and I thought I'd try to put the code into my test project to see what it does. I wonder if I'll know if the code is working or not since I don't fully understand the end goal. I was hoping you could explain a little further explanation of what you were trying to or are accomplishing with this code. When you say "reference" the value of Company, are saying that you want the value of the Company field to be entered/transferred into the Details table when you add a new Details record? You've acknowledged that the ID is automatically transferred, by which you could display any field from the Master table later on the Details through a Join, at least that is how I understand it. If this is the case, and of course bare in mind I wouldn't be asking this if I understood completely anyway, what would be the purpose of "referencing" the value of Company (out of Master) directly in the Details? I hope I've posed my question in a way that can be understood because if you've identified a way to do something that might be useful in my own project, I'd definately want to learn from your efforts. Thank you. |