Alpha Video Training
Results 1 to 3 of 3

Thread: One to one data binding in a UX

  1. #1
    Member bob9145's Avatar
    Real Name
    Bob Senski
    Join Date
    Jun 2009
    Posts
    804

    Default One to one data binding in a UX

    I want to save two records to two linked tables in one UX component. Through data binding I bound the fields to their respective DBF tables in a one to one relationship through the builder. (the customer tbl & call tbl) I don t want them bound through a record number, I want to use the auto incremented field (generated via field rules) from the customer table and save it as a foreign key in the calls table: C_ID customer (auto incremented) = C_ID calls.

    Can this be accomplished by using an expression as opposed to using the record number in the builder? I linked the tables via the common C_Id field in the builder. both records are created but the value of C_Id saved to the calls table is zero.

    Can this all be just as effectively accomplished using the record number? I plan to exploit this relationship in other components (views).

    What am I missing? How can I accomplish this?

    I am guessing that the issue is being created because the auto incremented value is missing from the code saving the linked record. I know this value is available in the e.datasubmitted variable. Can this be captured in the expression, or would this have to be coded in an event? Or none of the above?

    Thanks
    Bob

  2. #2
    Member bob9145's Avatar
    Real Name
    Bob Senski
    Join Date
    Jun 2009
    Posts
    804

    Default Re: One to one data binding in a UX

    I would have to conclude that writing to multiple tables within Alpha is not well supported to a dbf outside of a repeating section. I will try using a sql database instead, stay tuned.
    Bob

  3. #3
    Member bob9145's Avatar
    Real Name
    Bob Senski
    Join Date
    Jun 2009
    Posts
    804

    Default Re: One to one data binding in a UX

    Referential integrity is not that big of a deal for my app. I don t need cascading deletes, I just want to be able to add and link records in flexible ways. Data binding states that it allows you to write to one or more tables, but at least as far as DBf tables are concerned it doesn't let you link the tables via a common auto incremented primary, and foreign key, even though the binding builder allows you to link table fields. Unless I am doing something wrong?

Similar Threads

  1. Need help with data binding and primary key in UX
    By Tbrondolo in forum Mobile & Browser Applications
    Replies: 12
    Last Post: 06-03-2014, 07:59 PM
  2. UX component data binding of VIEWS
    By jmsilva in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 11-07-2013, 05:27 PM
  3. UX Data Binding with more than 5 PK Fields
    By ChristopherG in forum Application Server Version 11 - Web/Browser Applications
    Replies: 0
    Last Post: 10-22-2013, 10:32 AM
  4. How to set up Data Binding in 1:Many Relationship
    By forskare in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 08-15-2012, 11:54 PM
  5. Data binding in Dialog2
    By Sparticuz in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 10-25-2011, 01:26 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
  •