none
Logic for record editing and approval RRS feed

  • Question

  • I have have a form with input fields ( username, actual name, age ,location), a subform datasheet and commandbutton to save record. So when the user saves a record, it appears on the grid. In case the username typed already exist the save button caption changes to update and user can modify the record.

    Now my team wants additional functionality

    When users modify the records the actual change should only happen after approval from the admin.
    Also, the admin should be able to see old and new value.

    How do I manage these.
    Sunday, June 19, 2016 4:22 AM

Answers

  • Without going into details, you could modify your current code to do as before but save the user changes to a temp table and create an Admin Form where both the original (from the original table) and the changed user data (from the temp table) is displayed together with an Approve button which when clicked then copied the data from the temp table to the original table.


    Best regards, George



    Sunday, June 19, 2016 12:51 PM
  • Hi Santosh Vi,

    you can create 2 tables with the name Approved and Not Approved.

    Assume that you want to update the data of Employees then first when employee try to update his details then you just need to insert the data in Not Approved table.

    and display the message to user that Admin will be approve this data.

    then if Admin approves then insert the data in Approved table and delete from Not Approved table. Now you can update the data in Employee table from Approved.

    if Admin not approve the data then you just need not to take any step the data will be stored in Not Approved.

    if you work like this then you have data of Approved and Not Approved and you can tally this data in future which are not approved and also inform the user regarding this.

    Also if you add a Field of Date in these tables then it is more useful. you can try to update data base on date.

    also another thing I want to say about your fields.

    you had use age in your fields.

    you will enter the record 1 time but age will change every year.

    so when you will try to fetch the data of age you will get wrong age.

    so instead off age you can use Date of Birth which will never gonna change and every time you will get correct result.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 20, 2016 5:52 AM
    Moderator

All replies

  • Without going into details, you could modify your current code to do as before but save the user changes to a temp table and create an Admin Form where both the original (from the original table) and the changed user data (from the temp table) is displayed together with an Approve button which when clicked then copied the data from the temp table to the original table.


    Best regards, George



    Sunday, June 19, 2016 12:51 PM
  • Hi Santosh Vi,

    you can create 2 tables with the name Approved and Not Approved.

    Assume that you want to update the data of Employees then first when employee try to update his details then you just need to insert the data in Not Approved table.

    and display the message to user that Admin will be approve this data.

    then if Admin approves then insert the data in Approved table and delete from Not Approved table. Now you can update the data in Employee table from Approved.

    if Admin not approve the data then you just need not to take any step the data will be stored in Not Approved.

    if you work like this then you have data of Approved and Not Approved and you can tally this data in future which are not approved and also inform the user regarding this.

    Also if you add a Field of Date in these tables then it is more useful. you can try to update data base on date.

    also another thing I want to say about your fields.

    you had use age in your fields.

    you will enter the record 1 time but age will change every year.

    so when you will try to fetch the data of age you will get wrong age.

    so instead off age you can use Date of Birth which will never gonna change and every time you will get correct result.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 20, 2016 5:52 AM
    Moderator