Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2003
    Location
    down on the cube farm, left then right then another left
    Posts
    467

    Unanswered: create almost duplicate record with forms

    Setup: 9i Forms, 9i data base

    I need to create an almost duplicate (key fields need to be different of course) record in the data base. Any thoughts on how to do this with other than brute force? Brute force being:
    insert into table Values( new_key, data from copy, data from copy, etc)?

    I have considered having a shadow block that gets the values from the source but wonder if there is a more graceful way.
    NOTE: Please disregard the label "Senior Member".

  2. #2
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110

    Re: create almost duplicate record with forms

    Originally posted by Todd Barkus
    Setup: 9i Forms, 9i data base

    I need to create an almost duplicate (key fields need to be different of course) record in the data base. Any thoughts on how to do this with other than brute force? Brute force being:
    insert into table Values( new_key, data from copy, data from copy, etc)?

    I have considered having a shadow block that gets the values from the source but wonder if there is a more graceful way.
    Write an on-insert trigger in the source block, where put 1 multi-table insert statement. Is this considered to be bruce force? Creating multi blocks seems to be bruce force to me in this case.

  3. #3
    Join Date
    Nov 2003
    Location
    down on the cube farm, left then right then another left
    Posts
    467
    I consider my approach and your approach both "brute force". Sorry I did not clarify my statement.

    On-insert will not do it either. I realized as I read your reply that I do not think there is any method other than my shadow block approach. I will not be creating the record until they have fiddled with it some. To do that it needs to be already in the new/shadow block. I think the "copy_from" property is going to come in handy.
    NOTE: Please disregard the label "Senior Member".

  4. #4
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110
    If you think that's the only way, try it. Good luck.

  5. #5
    Join Date
    Nov 2003
    Location
    down on the cube farm, left then right then another left
    Posts
    467
    Always open to different opinions.
    NOTE: Please disregard the label "Senior Member".

  6. #6
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110
    Originally posted by Todd Barkus
    Always open to different opinions.
    It really depends on detailed requirements of your form...

  7. #7
    Join Date
    Nov 2003
    Location
    down on the cube farm, left then right then another left
    Posts
    467
    Yep.

    User will view a record and if that record is the correct "source" for there new record they will hit a button and all the data will get moved to a new record block. In the case of using the copy_from (copy_value_from_item to be specific) property this will already be done. The button is just a theatrical vehicle at that point. They then can make any changes needed and commit the new record.
    NOTE: Please disregard the label "Senior Member".

  8. #8
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110
    Originally posted by Todd Barkus
    Yep.

    User will view a record and if that record is the correct "source" for there new record they will hit a button and all the data will get moved to a new record block. In the case of using the copy_from (copy_value_from_item to be specific) property this will already be done. The button is just a theatrical vehicle at that point. They then can make any changes needed and commit the new record.
    I assume the source block is single record. Then your solution sounds good. If multiple, you will have to deal with the situation that user wants to move some not all of the source to the target.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •