Alpha Video Training
Results 1 to 6 of 6

Thread: Help with dialog and repeating sections

  1. #1
    Member
    Real Name
    mike weatherley
    Join Date
    Jan 2011
    Posts
    33

    Default Help with dialog and repeating sections

    Hi,

    I have a dialog with a repeating section, its very similar to an invoice type dialog with a customer header and invoice line items in the repeating section.

    The data is bound to 2 sql tables - invoice_header and invoice _detail, the linking field is invoice_id.

    When I want to edit an invoice I open the dialog with the invoice number and the invoice detail shows in the repeating section.

    Everything works fine except that if I delete a row in the repeating section and submit the form ALL of the records for the invoice are deleted in the invoice_detail table. I assumed that deleting a row in the repeating section would only remove that record from the invoice detail table ?

    Do I need to create additional code to handle this type of action ?

  2. #2
    Member
    Real Name
    Ian Mackie
    Join Date
    Oct 2012
    Posts
    10

    Default Re: Help with dialog and repeating sections

    Interesting. whats your table setup like? I see you have two tables, whats the relationship between them, primary keys?, unique keys? Sounds odd that its deleting all records WHERE the primary key. What kind of join are you using Inner join?

  3. #3
    Member
    Real Name
    mike weatherley
    Join Date
    Jan 2011
    Posts
    33

    Default Re: Help with dialog and repeating sections

    Hi Ian,

    2 tables, invoice_header and invoice_detail.
    Primary keys are auto increment fields on both.
    Linking field is invoiceNumber.

    Its a 1 to many relationship but all of this is handled by the component.

  4. #4
    Member
    Real Name
    Ian Mackie
    Join Date
    Oct 2012
    Posts
    10

    Default Re: Help with dialog and repeating sections

    So there is no actual relationship in SQL Server? What SQL are we talking about here? Though I don't think its relevant since the front end is handling it. No stored procedures or triggers..this is interesting. if you throw in a debug(1) or Show Debugging info on the after dialog validate event are you seeing alpha actually performing the delete of the records in question?
    Last edited by Jester0311; 06-04-2013 at 09:01 PM. Reason: Typo

  5. #5
    Member
    Real Name
    Matt Bavis
    Join Date
    Mar 2008
    Posts
    45

    Default Re: Help with dialog and repeating sections

    I presume you have invoice_detail bound to the repeating section. I think you will find the problem in the databinding section of your dialog. Make sure invoiceNumber is not set as the Primary key field for the invoice_detail table.

  6. #6
    Member
    Real Name
    Ian Mackie
    Join Date
    Oct 2012
    Posts
    10

    Default Re: Help with dialog and repeating sections

    Yep that would do it.

Similar Threads

  1. Error Message on Dialog with multiple repeating sections
    By Scott B in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 08-28-2013, 06:08 PM
  2. I need a running total in repeating sections of a dialog
    By Tbrondolo in forum Application Server Version 11 - Web/Browser Applications
    Replies: 7
    Last Post: 10-25-2012, 03:44 PM
  3. Need code for saving repeating sections in dialog
    By Tbrondolo in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 10-22-2012, 11:48 AM
  4. Submitting Data with a Dialog containing repeating sections
    By richard@tbdinc.net in forum Application Server Version 11 - Web/Browser Applications
    Replies: 5
    Last Post: 09-01-2012, 11:29 AM
  5. How do I populate v.11 dialog repeating sections
    By Jay Talbott in forum Application Server Version 11 - Web/Browser Applications
    Replies: 6
    Last Post: 03-07-2012, 06:29 PM

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
  •