Alpha Video Training
Results 1 to 17 of 17

Thread: Load Primary keys for Parent Table Not Populating Controls

  1. #1
    Member
    Real Name
    Joe Lavely
    Join Date
    Jun 2013
    Posts
    451

    Default Load Primary keys for Parent Table Not Populating Controls

    Build 6012-5338

    I have a UX with 2 controls. Both controls are bound to a MySQL table. The table has only 2 records.

    I am trying to figure out why the controls are not being populated.

    I added a slider to the Load Primary keys for Parent Table, to show that it is counting the 2 records in the table.

    This is a very small example to demonstrate the issue I am having in a much more complex UX.

    To run this you will have to modify the binding to use your own connection. You can use the table dump file I have enclosed, or create a table with 2 columns.

    Any help is appreciated.

    TestCarrier.zip


    Here is a video with bad resolution. I think youtube doesn't like my hi-res monitor.


  2. #2
    "Certified" Alphaholic
    Real Name
    Larry Grupido
    Join Date
    May 2010
    Posts
    1,764

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    I downloaded your UX and followed your instructions. It works for me just fine.

    I made no changes other than changing the connection string and then refreshing the primary key load.

    What version of Alpha are you using? (I am using build 5667)

    If you are using a newer build, I would recommend upgrading all the way to current build and make sure you apply the hotfix.

    If you are using an older build, I recommend 5667. I have been using it for months and it has proven to be solid for me.

  3. #3
    Member
    Real Name
    Joe Lavely
    Join Date
    Jun 2013
    Posts
    451

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    I am using Build 6012-5338, the latest official release. It has seemed pretty stable so far. I could try rolling back to an earlier release, but since the addition of "Conversion to new format (build 5956) has run" I am leery of doing so.

    Thanks for looking at it.

  4. #4
    "Certified" Alphaholic
    Real Name
    Larry Grupido
    Join Date
    May 2010
    Posts
    1,764

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    If you are going to go back, back everything up first, then go back. Test this one thing - if it works, submit a bug report - if it still doesn't work, shout back!

    Afterwards, just restore from your backup and move on.

    Note: Alpha didn't change anything in your data. If it did a conversion it was to your UX and grid files. Mostly, Alpha is very backwards compatible. When it converts, it is adding new properties to a UX, but those new properties should not interfere with older versions - they just get ignored.

  5. #5
    Member
    Real Name
    Joe Lavely
    Join Date
    Jun 2013
    Posts
    451

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    This is what I have found through experimentation. Perhaps you can re-create it...

    Make a simple UX with a few controls, and bind the controls to columns in a single table.

    Add Save_Submitted_Data_to_Table_s in afterDialogValidate event.

    Add a button with {dialog.Object}.submit(); in the onClick event.

    Run it, add some values to the controls and submit.

    Everything works as expected so far.

    Now add another control, and bind it to another column in the same table. Make sure it is Updateable.

    Run it, add some values, and submit.

    The newly added control does not save to the table.

    Remove all binding, and re-create all the binding, and now it saves correctly.

  6. #6
    "Certified" Alphaholic
    Real Name
    Larry Grupido
    Join Date
    May 2010
    Posts
    1,764

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    I have done that often in my application. It has never failed for me.

    But try this: Repeat those steps.

    Instead of removing all binding, click on the save_submitted action … select Action Scripting at the top and edit action. Just go in and click OK.

    Now try again.

    does it work now?

    I always go into those actions after making table changes.

    If that doesn't fix it, I would submit as a bug. Me testing it wouldn't help because if it worked that way in my version I would know about it by now!

  7. #7
    Member
    Real Name
    Joe Lavely
    Join Date
    Jun 2013
    Posts
    451

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    Yes I do open the Save Submitted builder every time. Doesn't help.

    This may be a bug. I would like someone to try to re-create it in build 6012-5338, following my steps in post #5.

  8. #8
    "Certified" Alphaholic
    Real Name
    Larry Grupido
    Join Date
    May 2010
    Posts
    1,764

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    If I update to that build and remember to do it, I will!

  9. #9
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,352

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    Hi Joe,

    Just for the fun of it, I created a fresh ux based on the one you supplied.
    I am using the same build you are, but this works.
    I have no idea what the difference is, but it clearly works as expected.
    Attached Files Attached Files

  10. #10
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,667

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    Have you applied the hotfix to build 6012?

  11. #11
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,352

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    My first ever youtube video. Someday I might get brave enough to narrate a video.
    If the video is too grainy, it can be downloaded from here https://drive.google.com/open?id=1Gl...lXNo_gsLQcm25v


  12. #12
    Member
    Real Name
    Joe Lavely
    Join Date
    Jun 2013
    Posts
    451

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    Yes I did install the hotfix for build 6012.

    Greg, the video is great, but since I have found that deleting and re-creating all the binding settings fixes the problem, then what you are demonstrating in the video will not show the problem, because you are creating the binding from scratch.

    In fact, using the test UX I attached to my first post will not demonstrate the problem.

    The extra step that is required is after creating a UX that works as in the video, add another column to the table and add a control to the UX and bind the control.

    Then see if it works as expected.

  13. #13
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,352

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    Hi Joe,
    I added a column and altered the bindings.

    Code:
    alter table carriers add column randomtext varchar(20);
    update carriers set randomtext = 'Venus';
    update carriers set randomtext = 'Idaho' where carrier_ID=2;

  14. #14
    Member
    Real Name
    Joe Lavely
    Join Date
    Jun 2013
    Posts
    451

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    Greg, you are using a different method to add a new column than I use, but t looks to me like you should be seeing the problem occur.

  15. #15
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,352

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    What method did you use to add a column ?

  16. #16
    Member
    Real Name
    Joe Lavely
    Join Date
    Jun 2013
    Posts
    451

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    I add it in Navicat, then refresh the bindings in AA as you did. So I don't see that the method of adding a column should make any difference. It must be something else.

  17. #17
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,352

    Default Re: Load Primary keys for Parent Table Not Populating Controls

    I did it from the AA SQL command window because everyone here has access to that, and it shows the
    response AA gets from the database.
    I couldn't get your first UX to work properly which is why I opted to build a new UX using the same DB.

Similar Threads

  1. phone gap app load primary keys based on logged username in label
    By amitloh in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 08-15-2017, 07:41 PM
  2. Problem Populating a Dialog from Tables and Loading Primary Keys
    By DaveF in forum Application Server Version 11 - Web/Browser Applications
    Replies: 7
    Last Post: 03-18-2014, 03:27 PM
  3. Filter Primary Keys
    By CharlesParker in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 03-10-2014, 01:00 AM
  4. A newbie question re: load primary keys for a parent table action
    By JohnHoff in forum Application Server Version 11 - Web/Browser Applications
    Replies: 3
    Last Post: 05-29-2013, 10:17 AM
  5. Sql Dual Primary Keys
    By chadbrown in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 08-14-2010, 09:40 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
  •