Alpha Video Training
Results 1 to 5 of 5

Thread: Update multiple records from button

  1. #1
    Member
    Real Name
    Dwight Reese
    Join Date
    Nov 2008
    Posts
    9

    Default Update multiple records from button

    Hi - I have a print preview of a report from a button on-click event that works fine. What I would like to do is update a date field on all of the records that show in the print preview. I tried adding an additional action, Xbasic change record, using the same filter expression, selecting the field date_Tusent and updating the field to the result of the expression date(). The error I get is 'More than one record was found that matches the filter expression. No records were updated.

    I guess that the action is only intended to update a single selected record at a time? What should I use to change multiple records?
    Thanks!

  2. #2
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Update multiple records from button

    Hi Dwight,

    Create an Operation to Update Records, using the same filter as the report.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  3. #3
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Update multiple records from button

    There is a nice little script in the documentation for updating records as they are printed. It is in the Events for Reports section of this link.
    There can be only one.

  4. #4
    Member
    Real Name
    Dwight Reese
    Join Date
    Nov 2008
    Posts
    9

    Default Re: Update multiple records from button

    The update operation worked great, thanks for the tip!

  5. #5
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Update multiple records from button

    Hi Stan,

    Thanks for the pointer to OnRecord Event for reports.

    How would you only update a record when the report was actually printed and not when it was previewed?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

Similar Threads

  1. 'Add' button target page and Update button
    By Scholin in forum Application Server Version 8
    Replies: 1
    Last Post: 12-13-2007, 09:50 PM
  2. Update Operation Not Finding Records to Update
    By davidab in forum Alpha Five Version 8
    Replies: 11
    Last Post: 11-13-2007, 09:44 AM
  3. Replies: 8
    Last Post: 02-12-2007, 02:43 PM
  4. Update fails to find any records to update
    By joshua brimdyr in forum Alpha Five Version 5
    Replies: 6
    Last Post: 03-11-2003, 03:47 AM
  5. Button for printing multiple pages
    By Alex Levy in forum Alpha Five Version 4
    Replies: 5
    Last Post: 01-22-2002, 08:52 AM

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
  •