This topic is locked

Copy current record

9/2/2015 10:45:28 AM
ASPRunnerPro General questions
J
jmccullough author

I have a strange request from my supervisor. I need to make a copy of a record selected (List Page using copy icon) without opening the record and having to save it. The flow of what he wants to happen is as follows:

  1. User does not have "Edit" privileges
  2. User Adds a new record.
  3. If a change is required to an existing record, User makes a copy of that record and emails a Change request to the "Admin" who will edit record.
    Right now, even though my User does not have edit privileges when they copy a record, it opens and they have the capability to edit the record before saving it, we can't have this. Can they copy and save without opening it.
    Is it possible to Copy an existing record without actually opening it and having to "Save" it ?
    Using ASPRunner Pro 7.2
    Any help or suggestions are appreciated.
    Thank you

admin 9/2/2015

Copying record is not editing it. When user clicks 'Copy' they are directed to the Add page that is pre-populated with data from existing. Imagine someone clicking 'Add new' and then just copying and pasting data from existing record.
Even if you invent a way to copy a record without need to save it users can still click 'Add new' and just do that thing manually. You can probably disable the 'Copy' function and add a custom 'Copy' button that will do the job though in version 7.2 this will be much more complicated. In later versions we have an option for button added to the grid to access selected record data and this where you can create a copy of record automatically behind the scene.

G
gonzalosb 9/3/2015

hi Jmak,

first you need to turn off copy record and options


2. in visual editor create an EDIT PAGE with the fields on READ ONLY.

. add a snippet as text where you can add the change request without been save on the database.

. delete the save button or limit users to use it if not administrator

. add a button that send email


the email function will collect the info from the VIEW PAGE and send it for review
on server tab



DoAssignment data, button.getCurrentRecord()
body= "OrderID: " & data("OrderID") & _

vbcrlf & "Customer: " & data("CustomerID") & _

vbcrlf & "OtherRecord: " & data("OtherRecord") & _

vbcrlf & "-------------------" & vbcrlf & vbcrlf
set tmpDict = CreateObject("Scripting.Dictionary")

tmpDict("to")= "test@manager.com"

tmpDict("subject")= "REQUEST DATA UPDATE"

tmpDict("body")= body

tmpDict("charset")= "UTF-8"

runner_mail tmpDict


on client after



result("txt") = "REQUEST_WAS_SENT"


this work on ver. 7.2
if you have any questions please let me know