Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Autofind same record after save routine?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Autofind same record after save routine?

    Let me start by thanking everyone for all your extremely vaulable help. I know you don't have to volunteer your time to help folks like me, and I wanted you to know I appreciate it.

    My question is this: Is there a way to automatically find a record, just after the user clicks on the "save button"?

    DataFlex Default: When the user clicks the save button, DataFlex asks "Confirm? Save this record?". The user clicks on "YES", and DataFlex saves the record, and then CLEARS THE RECORD.

    In my application, DataFlex clearing the record creates problems for the user. I need a way to stop the record from being cleared after the save routine, OR the record needs to be found after the save routine.

    At this point, I must admit, I thought I knew how to do it and tried it myself before posting here... I went into the Data Dictionary, clicked on "Events", then clicked on "OnSaveRecord", and then tried to add some code to find the next record. What I ended up doing was really screwing up the Data Dictionary such that it wouldn't compile, and it actually vanished from my list of Data Dictionaries in my workspace! I managed to get it all back from a recent backup, but now the "OnSaveRecord" lightning bolt is black, which I assume means it has been edited. I do not think it's been edited -- I think it's back to original, but I can't explain the black lightning bolt! Thank GOD for backups!

    Frustrated (yet somehow proud at the same time),
    Guy
    SSS Fence -- Since 1947

  2. #2
    Join Date
    Feb 2009
    Location
    Goteborg, Sweden
    Posts
    3,189

    Default Re: Autofind same record after save routine?

    Hi,

    Set;
    Set Auto_Clear_DEO_State to False

    It is a property of the DbView class. You'll find it under the Studio's "Properties panel - Data", when the DbView object has the focus.
    Nils Svedmyr
    RDC Tools International
    www.rdctools.com

    "The problem with internet quotes is that you don't know if they are true."
    Abraham Lincoln

  3. #3

    Default Re: Autofind same record after save routine?

    That worked great! Thank you!

  4. #4
    Join Date
    Feb 2009
    Location
    SW Connecticut/NY area
    Posts
    9,181

    Default Re: Autofind same record after save routine?

    Be aware that setting Auto_Clear_DEO_State in a view with groups and other containers may mean that you have to add the setting of Auto_Clear_DEO_State to the groups inside the view.
    Bob Worsley
    203-249-2633
    rlworsley at gmail.com

    Do or do not. There is no try. — Yoda

  5. #5

    Default Re: Autofind same record after save routine?

    Thanks Bob. I did think of that when making the change, and tested it -- and it appears setting Auto_Clear_DEO_State to the view, automatically filters down to the all my tab views.

  6. #6
    Join Date
    Feb 2009
    Location
    Somewhere in Vermont, USA - unless I'm not
    Posts
    11,085

    Default Re: Autofind same record after save routine?

    Just be aware that you need to thoroughly test this - as sometimes it filters down & sometimes it doesn't...
    Garret

    Time for an oldie but goodie:

    "If it ain't broke, you're not trying." - Red Green

  7. #7
    Join Date
    Feb 2009
    Location
    Hengelo, Netherlands
    Posts
    10,869

    Default Re: Autofind same record after save routine?

    Garret,

    Sorry, it is not sometimes; it follows the rules set by the application framework.
    Regards,
    Data Access Worldwide
    Vincent Oorsprong

  8. #8
    Join Date
    Feb 2009
    Location
    Somewhere in Vermont, USA - unless I'm not
    Posts
    11,085

    Default Re: Autofind same record after save routine?

    Fair enough - but when you don't know the rules, it can seem random. A bit like being married maybe?
    Garret

    Time for an oldie but goodie:

    "If it ain't broke, you're not trying." - Red Green

  9. #9
    Join Date
    Feb 2009
    Location
    Hengelo, Netherlands
    Posts
    10,869

    Default Re: Autofind same record after save routine?

    Bob,

    Before we - to be safe than sorry - add the property to every group or container; one would only need to pay attention to this if the container/group explicitly sets the server property and handles the save request. It is the request_save that queries the property.
    Regards,
    Data Access Worldwide
    Vincent Oorsprong

  10. #10
    Join Date
    Feb 2009
    Location
    SW Connecticut/NY area
    Posts
    9,181

    Default Re: Autofind same record after save routine?

    Good to know Vincent. I should have said, as Garret did, the behavior should always be tested.
    Bob Worsley
    203-249-2633
    rlworsley at gmail.com

    Do or do not. There is no try. — Yoda

Page 1 of 2 12 LastLast

Posting Permissions

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