Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Need help with data binding and primary key in UX

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need help with data binding and primary key in UX

    I have a UX bound to a SQL backend table that has two primary keys. On is an auto-increment record id and the other is a unique identifier. I want the UX to bind only to the unique identifier. I can achieve this in the UX by refreshing the bindings and then deleting the ID key and all works fine.

    But... every time I touch the UX it refreshes the primary keys and the CRUD does not work and I have to then go back and change the settings.

    Is there a way to force a primary key or to turn off the refresh?

    Thanks
    tom

    #2
    Re: Need help with data binding and primary key in UX

    I can't see a way to turn that stuff off. Can we look at this another way? What is it that you're doing that you need to ignore the auto increment key? Maybe there's another way to get it done without messing with the bindings?

    Comment


      #3
      Re: Need help with data binding and primary key in UX

      I'm populating a UX based on a call from an onclick event where the users selects a unique id. so the users picks id "PID0001" and the UX should populate on that id. I suppose I could do a SQL lookup to get the primary key id but that seemed like looking up the record twice. There is probably something I am missing on proper methodology but it just seem strange to give the ability to pick an alternate key and then have it keep changing back. I'm going to look at the javascript on loading primary keys and see if there is a method to set the key.

      Comment


        #4
        Re: Need help with data binding and primary key in UX

        Just a bit more info, Tom.

        1. Are you using an Action to populate the UX? If so, which Action? Bound?
        2. Are there 2 components involved here? 1 - select the Key, 2 - the UX to populate? Or just 1 UX component?
        3. The user select a unique Id... from what? A Dropdown? A Grid? A UX? What's the source... not the same table as your two-part key table?

        I understand your problem. You're got one part of the key... the 2nd part (PID0001). You need to populate your UX, which is based based on the 2 part key, but you've only got one part of the key.

        Comment


          #5
          Re: Need help with data binding and primary key in UX

          Hi David,

          In one case I'm populating the key (pid0001) from a grid row. In the overide settings for opening the UX I assign this to a session variable. So component 1 has the PID0001 and I would like to use that in the data binding for the UX in component 2. The process works, but it's a pain to keep having to check that the data bindings did not change if I happen to open the UX in design mode.

          Comment


            #6
            Re: Need help with data binding and primary key in UX

            Is the UX (component 2) data bound or unbound? Is the Grid bound to the same table that is populating the UX?

            Comment


              #7
              Re: Need help with data binding and primary key in UX

              Tom,

              I don't think your last message got through... 7:11pm.

              Comment


                #8
                Re: Need help with data binding and primary key in UX

                hi everyone,

                I really need your advice about having couple of list controls and two or more sets UX controls bind to two different tables... (ei. customers table and employee table)... I can only bind UX controls to ONLY one selected table. Is there anyone got a way around this challenge??

                Comment


                  #9
                  Re: Need help with data binding and primary key in UX

                  Are your tables linked? if so have you created relationships between tables?

                  You can also just do the CRUD operations in an Ajax callback. Even though it is more programing it does give you more control.

                  Tom

                  Comment


                    #10
                    Re: Need help with data binding and primary key in UX

                    I need to learn how to do the Ajax callback.. please provide me with proper link, or reference. I think I need to make a call from one UX component object to the next one.. for instance, one UX object will deal with the table "employees" and the other UX component will get its data binding from another table "customers".. etc.. and a third one that will tap into yet another table call "jobs" which has link to the customer table and the employee table and the service table. also, I could do programming with global functions using xbasic.. but I have not successfully able to call such a global function from one of the buttons on one of the UX compoments.. please help.. I am greatly and eagerly await for your advices.. Thank you in advance.. ps.. the table are not linked.. they are independent tables..

                    Comment


                      #11
                      Re: Need help with data binding and primary key in UX

                      Take a look through the video's on callbacks. I think Number 85 is a good one. There are lot's of examples of different types of callbacks so try that as a start.

                      Comment


                        #12
                        Re: Need help with data binding and primary key in UX

                        Originally posted by Tbrondolo View Post
                        every time I touch the UX it refreshes the primary keys and I have to then go back and change the settings.
                        I had this problem too

                        Table has autonumberID (which is not the primary key)

                        and two other fields that are the primary key (employeeID and Date)

                        But I wanted the UX bound to the autonumberID field

                        In design mode, the UX kept changing the primary key from what I had set it to (autonumber) back to the primary key (employeeID, Date)

                        The only way I found to make it stop doing this was create a SQL Server view of the same table.

                        By using a View as the data source (instead of the table) the UX can no longer look see the real primary key, therefore the UX data binding never changes any more, it just stays exactly how I set it the first time.

                        Comment


                          #13
                          Re: Need help with data binding and primary key in UX

                          Hey thanks Mixter

                          That was very helpful. It was a really annoying item that would create "bugs" every so often when I would forget to check the primary key settings.

                          Tom

                          Comment

                          Working...
                          X