locked
Grab data captured on a detail form RRS feed

  • Question

  • User-326746839 posted

    Hi,

    I'd like to "grab" the data collected in a detail form after the user has selected "update" or "insert" and pass the "selected TEXTS" from all dropdwonlists to some fields in my tables that will gather that data ...

    Let's say for instance that I have chosen a category, a customer and an telephone from 3 different dropdownlists BUT there is a possibility that later on (tomorrow, a month, a year after this happened) that data might change and I need to recreate one specific "Invoice" in current time but showing the data that was used when the invoice was created (let's say that for for account audit or database audit reasons) 

    So if I don´t collect that data then the "past invoice" will reflect "current data" not the one thta was used by the time it was generated/created which will be wrong because it will show data which is not true

    Thanks in advance

    Carlos N. Porras
    (El Salvador) 

    Monday, November 19, 2012 1:12 PM

All replies

  • User3866881 posted

    Hello,

    I feel puzzled:

    1)Why not change the data directly but wanna a copy of data when you tend to modify something new?

    2)Can you show us your screenshots of your UI as well as your steps in details?What do you expect to do?

    Tuesday, November 20, 2012 2:35 AM
  • User-326746839 posted

    Hi,

    Nothing to be puzzled or anything out of the ordinary .... my example can be silly but is an s cenario that I need to achieve implementing because of the nature of the business rules of a system.

    I just need a way of gathering the information that had jut been entered for the end user on Insert or Update operations ... that's all 

    I have valid reasons in order to do this .... but that's not the point .... I just need to know how to do that in a Northwind database or any other database .... So, the point is not what am I going to do with the data BUT showing me a way of achieving my request: GATHERING THE DATA SHOWN ON SCREEN JUST AFTER YOU HAVE PRESSED INSERT OR UPDATE BUTTONS

    So, if you have a screen showing data from 10 tables (let's say 7 of them are foreign keys of the screen you are currently using) it willbe nice to have available the following:

    name of the table, numeric index chosen, text label chosen on the combo for each one of the controls used

    Is that so hard to achieve?


    Carlos N. Porras 
    (El Salvador) 

    Tuesday, November 20, 2012 5:30 PM
  • User3866881 posted

    klca

    Hi again,

    GATHERING THE DATA SHOWN ON SCREEN JUST AFTER YOU HAVE PRESSED INSERT OR UPDATE BUTTONS

    You can handle the event of Item_Inserted or Item_Updated in DetailsView,FormView by referring e.Values[index starting from 0]

    Tuesday, November 20, 2012 8:23 PM
  • User-326746839 posted

    Hi and thanks Mr. Dong,

    Those that e.values provides name of the table, numeric index chosen, text label chosen on the combo for each one of the controls used?

    Is there a way of running a loop among all the formview or detailsview controls so you can build or show on screen what I am asking showing some kind of text like Response.Redirect thing?

    Carlos N. Porras
    (El Salvador) 

    Wednesday, November 21, 2012 12:11 AM
  • User3866881 posted

    Those that e.values provides name of the table, numeric index chosen, text label chosen on the combo for each one of the controls used?

    Hello,

    Sorry but this doesn't offer so many records of information, I think you can just save the table name inside the Session and reteive it back when you need.

    Reguards!

    Wednesday, November 21, 2012 1:33 AM
  • User-326746839 posted

    Hi Mr. Dong,

    But, is there a way of performing a loop (obviously inside a Dynamic Data page) for "stopping" (allowing me to see current info on screen) program execution so I can "see" my database environment at that specific time so I could be able to gather the data I want at that very moment?

    Imagine what I told you: If I had a screen showing me data from a table whose FKs are as many as 7 for instance. That would imply that I would have available 7 different stages of my database performing 7 different steps as to build an show my filters (dropdownlists) on screen ... isn't it?

    Carlos N. Porras
    (El Salvador) 
    P.S. AGAIN I APOLOGIZE FOR MUY POOR GRAMATICAL CONSTRUCTION IN THE ENGLISH LANGUAGE .... I'M A SPANISH SPEAKER  

    Wednesday, November 21, 2012 10:24 AM
  • User-326746839 posted

    Steve,

    Could you please give your opinion about this .... please

    Carlos N. Porras
    (El Salvador) 

    Wednesday, November 21, 2012 11:30 AM
  • User-326746839 posted

    Hi Mr. Dong,

    If Dynamic data is capable of "collecting" the information which is shown and/or selected in a page and/or form and Dynamic Data uses it for updating, deleting, filtering, displaying in its most natural flavour of features (I'm just trying to say that Dynamic Data does this all of the time, with no additional features just as it is in its most intrinsic way) and to perform all CRUD operartions in the database tables, then THERE ARE PLACES IN WHICH DYNAMIC DATA COLLEWCT AND GATHERS THIS DATA

    Having said that, if Dynamic Data is capable of playing and using, WHY IS THAT SUCH FEATURES ARE NOT EASILY AVAILABLE TO US BUT ARE KEPT AS SOMETHING HIDDEN INSIDE ITS ARCHITECHTURE?

    There must be a way of doing this because Dyb¡namic Data does with own devices all the time, ... or not?

    Carlos N. Porras
    (El Salvador) 

    Thursday, November 22, 2012 10:20 PM
  • User-330204900 posted

    there are ways of doing this at what point do you want access to this data at saving the form?

    Saturday, November 24, 2012 6:45 AM
  • User-326746839 posted

    Hi Steve,

    I am working in a project in which I will have to deliver DataWarehused data from my systems so I need to create on the fly the "un-normalized" or "de-normalized" sets of data from day 1 at the same time that my systems will be working "fully referenced with its entire data integrity"

    What I'm trying to say is that I need a way of working "normally" (the usual way we all programmers work with related tables/entities) and a second way (which is the "spoiled" version: the "un-natural version" for storing data) which will imply carry on in all of my detail tables the content (the text) of all dropdowwnlists chosen by the end-user.

    For this purpose I have the following:

    This is well known: Let's say that I have Products and Sections in the Nothwind database. Categories is Foreign Key (FK) of Products. 

    In my case I will have an extra column in my Products table in order to "STORE BOTH: the CategoryID PLUS CategoryName) ... and the date in which I performed this operation of course.

    In my case, if I have a table which has 7 foreign keys then I will create 7 additional columns for storing the "names" chosen by the user in each of the 7 dropdownlists.

    In that way I will have what I want ( ... well I really need) to save this redundant data in my tables (I know ... sounds crazy .... I am absolutelly nuts !!!!!)

    SO STEPHEN, I need to do this at the time of updating and at the time of Inserting the data 

    Carlos N. Porras
    (El Salvador) 

    Saturday, November 24, 2012 9:31 AM
  • User-330204900 posted

    Hi Carlos, for this sort fo thing I use somthing like this Implementing Audit Trail using Entity Framework I am working on a simplified version for my own use.

    Saturday, November 24, 2012 10:02 AM