Results 1 to 4 of 4

Thread: [Solved] Record jumping when adding record in web

  1. #1
    Senior Member
    Join Date
    Jan 2014
    Posts
    371

    [Solved] Record jumping when adding record in web

    Hi guys

    There was a change made recently to keep on the same record after editing in web & that works great.

    Is there any chance of having the same when we add a record?

    It just looks odd when a user presses save to add a record and then the displayed record jumps to a different one.

    We order on name and the interface will normally jump to the last record (based on tag name) after adding a record.

    Thanks in advance


    Simon
    Last edited by barrymavin; 2022-05-23 at 08:27.

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,885
    Blog Entries
    18
    If you are ordering the records and you add a record you will need to make sure the record moves to the "last" position and in an afterinsert *delegate* (not trigger) move to the last record.

    Records are displayed in the order that you specify.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Senior Member
    Join Date
    Jan 2014
    Posts
    371
    Hi Barry

    Thanks. That makes sense and of course exactly what we would have done in VFP.

    However, we have tried everything we can think of to achieve this with no success.


    We assumed we would make a field into a section search field and use Lianja.showDocument("section:section1?action=searc h&text=" + lcust_id);

    It works in dev from Lianja console but cannot make it work in web. Also cannot find the right place to call it from. afterinsert delegate seems too early. We want it when the user presses save, just before the record jumps to the last record in the index - Mr Yoyo.


    Our records are displayed in customer name order but we have a section search field set to cust_id which is a guid(). We currently only have two indexes on the table ie lower(name) and lower(cust_id) as guid() seems to be stored as lower case.

    So any pointers as to how would we search for the cust_id field using js and then move the current record pointer?

    Thanks in advance



    Simon
    Last edited by SpringBox; 2022-05-13 at 10:16.

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,885
    Blog Entries
    18
    This has been handled in 7.2. Its to do with having am "order by" on the section.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us