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

Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

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

    Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

    Ok, in a desktop you could create sets with tables to create one to one and one to many links. Easy and straight forward.

    I have yet to find the secret instructions or video/s that show how to setup tables where you would have a parent and child tables for a web app.

    I have a table named "Matrix". It contains a Matrix_ID, Matrix_Name & Company_ID

    I have a child table that needs to be tied to the parent table. I plan on using the field Matrix_ID as the linking field and there will be Many records in the child table linked to one record in the parent table.

    So does anyone know where I can find info on how to do this or the correct search terms to use so I can find the instructions or videos?

    Thanks a bunch in advance.

    #2
    Re: Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

    I had a hard time when I first had to do this as well. There are a couple of options.

    1. Create a new UX and use it to create your tables for you.
    Basically, add all of your controls for the Parent table including your unique identifying fields. Then add the controls for your child table (in a repeating section if necessary). Now click on "data binding" and click on "create new tables to match the controls on your UX component"

    2. Make your tables first and then the UX.
    Make your table and then create controls on your UX to match.
    OPTIONAL: When you add a control on your UX component you can choose to populate the controls based on your already created tables.
    Then go to data binding and bind the controls.

    After either method you will need to go into the server side events and execute server side actions to populate the dialog and save the submitted data to your tables.


    I'm not sure about which video to point you towards unfortunately.

    Comment


      #3
      Re: Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

      Preston, there are numerous ways to accomplish this which largely depends on what the source tables will be used for:
      1. If you only plan on viewing the information, analyzing or performing calculations on the information, or using it as selector for detailed records, I would suggest using a Mapped Table. If your more familiar with the xBasic side of Alpha, a mapped table should be easy to put together and you can create as many calculated fields as you want inside of it. Essentially, a mapped table will combine the selected fields from a parent table with the selected fields of 1 or more child tables into one large table. Once the mapped table is created, use it as your data-source for your component. From what I can tell, calculated fields render more quickly within a mapped table as opposed to performing the calculations inside a web component. But I could me wrong on that point. Lookup "Mapped Tables v9" in the help system for information of how to create.
      2. If you plan on updating the information or entering new records, you can either:
      a. Create a Grid Component for the Parent that opens up a detailed view of the information which is your child table.
      b. Create a Grid Component for the Parent that opens up a UX component which is your child table. or
      c. Create a UX Component for the Parent that opens up the child information in the same UX or a seperate linked UX.

      Its hard to suggest which method you should use without a more detailed description on the process you are trying to create. In both a. and c. above, your tables would be linked using a data-source view of the tables which is very similar to the method used to create Mapped Tables. In b. above, the Grid data-source is the Parent and the UX data-source is the child and the relationship between the two is not defined until you link the two together.

      As far as a video goes, I would review video "D1" even though it is older. Otherwise, you can look under the web publishing references in the helps table of contents, especially the sections on "Creating a Grid Component" and "Creating a Dialog Component".

      You may also want to restructure your question with more specifics on what you are trying to accomplish or a good description on how you would like your component to behave. The specifics on each field is not necessary but a good overview should enable someone to pinpoint which method to use and what you need to do to get started.
      Thanks,
      James

      Comment


        #4
        Re: Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

        In your first post you did not ask about anything but table structure. The way you did it is correct, so you are already there.
        Steve Wood
        See my profile on IADN

        Comment


          #5
          Re: Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

          Originally posted by Steve Wood View Post
          In your first post you did not ask about anything but table structure. The way you did it is correct, so you are already there.
          I thought I asked where to find information on how to setup relationships or sets with tables in a web app. I know it is called something else in the web development.


          Originally posted by jhackney View Post
          You may also want to restructure your question with more specifics on what you are trying to accomplish or a good description on how you would like your component to behave. The specifics on each field is not necessary but a good overview should enable someone to pinpoint which method to use and what you need to do to get started.
          Ok. what I am trying to do is make a web version of this.

          mat1.png

          In my desktop app, all of that and more is in one table But on the web it appears I can not display all of that, like that, with a grid or UX. So my thoughts are I would need to create a parent table and then place the break point rows as separate records in a child table.

          Something like this concept.
          mat2.png

          mat3.png

          Comment


            #6
            Re: Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

            <<I wasn't paying attention>> - Question: are you using DBF or SQL? Can show both, but they are handled a bit differently.

            Summary:
            DBF - create "View" in the grid or UX in the Query section, or use Linked Content (grids). Linked Content is a method to connect parent/child at the grid level.
            SQL - same as above plus create View directly in the database.
            Steve Wood
            See my profile on IADN

            Comment


              #7
              Re: Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

              Originally posted by Steve Wood View Post
              <<I wasn't paying attention>> - Question: are you using DBF or SQL? Can show both, but they are handled a bit differently.

              Summary:
              DBF - create "View" in the grid or UX in the Query section, or use Linked Content (grids). Linked Content is a method to connect parent/child at the grid level.
              SQL - same as above plus create View directly in the database.
              I am using SQL as I have been told it is better for the web although I think it is more of a pain in the ass then DBF.

              Will play with your suggestions in the morn.

              Thanks Steve.

              Comment


                #8
                Re: Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

                there is not much difference in tables in desktop and sql, the definition is the same. there is a parent table with a primary key and there is a child table with the primary key from parent included as foreign key.
                the difference comes the way alpha dbf and sql behave. when you want to insert data alpha provides a possible next record number so it is easy to build a set based on that imaginary record number, alpha will take care of any collision when you are submitting the data to change to proper record number if two or more attempting to insert the same record.
                on the other hand in sql the record needs to be inserted and the last inserted id to be generated then that can be inserted into the child record.
                this alpha takes care of it in dialog, but in grids you have to do it yourself.
                the combining of the parent and child can be done in the sql itself as a view or use the alpha to do it for you as sql datasource by building query for you, the same goes for reports too.
                whenever you see the source there are few that can be used to build the source for the grid.
                I have put together various screencasts to show various means of achieving the end result you are looking for.
                for the grid:
                single table alone
                multiple tables joined by linking field, can be done in alpha itself or you can create a view in sql ( when adding a record to both tables the parent need to be saved first then the child)
                for dialog same as above
                but alpha takes care of inserting in sequence to the tables connected
                see if any of these screencasts help.

                http://screencast.com/t/tRgeqJg1wI

                http://screencast.com/t/fCR87LdnoLm
                matrix1
                http://screencast.com/t/SP7DlGDBGzrY

                matrix2
                http://screencast.com/t/eW8NCpCi
                thanks for reading

                gandhi

                version 11 3381 - 4096
                mysql backend
                http://www.alphawebprogramming.blogspot.com
                [email protected]
                Skype:[email protected]
                1 914 924 5171

                Comment


                  #9
                  Re: Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

                  Whoops, sorry about my misunderstanding above. I don't know why I read what I did into your post. Must have had UX's on the brain.

                  Are you using MySQL or MSSQL or some other flavor?

                  These guys have you on the right track. I'll go hide in my corner now....

                  Comment


                    #10
                    Re: Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

                    Originally posted by -Jinx- View Post
                    Whoops, sorry about my misunderstanding above. I don't know why I read what I did into your post. Must have had UX's on the brain.

                    Are you using MySQL or MSSQL or some other flavor?

                    These guys have you on the right track. I'll go hide in my corner now....
                    AH,

                    First thing. The web equivalent of my desktop only app will be a hybrid for desktop and mobile so I will probably be using UX all the way. It will also be a SaaS.

                    I will more then likely do it with MySQL as a MSSQL server refuses to run on my development machine. Right now I am just testing pieces of my app in the attempt to get the layouts looking right and with the basics functioning right. For the testing I am using MySQL and also SQL to a Access DB.

                    I was able to find where to bind the tables in a UX. Now I just need to figure out how to get it to display.

                    Once I get all of that figured out it is off to the math races as my app uses some very intense mathematical calculations which I am hopeful I can do it all in XBasic.

                    Comment


                      #11
                      Re: Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

                      You can certainly use a UX, but you can use grids too and it's probably a lot easier. Here are two possible grid scenarios:

                      Parent grid contains parent table.
                      Child grid contains child table

                      Scenario 1: Link the two grids using a row expander.
                      Scenario 2: Link the two grids using linked content.

                      Row expanders show a "+" to the left of the parent row. Click the + and see the child grid/table

                      Linked content shows both grids at the same time. Navigate thru parent rows and the child records change accordingly.

                      You can use dbf. But ultimately you're probably better off with SQL.

                      Both Row expanders & linked content can be found under grid properties.
                      Peter
                      AlphaBase Solutions, LLC

                      [email protected]
                      https://www.alphabasesolutions.com


                      Comment


                        #12
                        Re: Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

                        Originally posted by preston2 View Post
                        AH,


                        I was able to find where to bind the tables in a UX. Now I just need to figure out how to get it to display.
                        Matrix2 screencast above should have the dialog, and how to bind.
                        All the dialog videos in version 11 should be useful.
                        If you give your table structure people can show how to build and display the dialog.
                        thanks for reading

                        gandhi

                        version 11 3381 - 4096
                        mysql backend
                        http://www.alphawebprogramming.blogspot.com
                        [email protected]
                        Skype:[email protected]
                        1 914 924 5171

                        Comment


                          #13
                          Re: Binding, Linking, Call me stupid but I cannot seem to find out how to do this.

                          I just got time to watch the Matrix1 and Matrix2 screencast. This makes sense to me. I will try the directions you outlined and see how it goes. I still have a long way to go in getting to know my way around in the web development side. It is just remembering where things are to do what I need done that will be the hardest part of the learning curve for me.

                          On your question of why I have "Company_ID" in the matrix table and the child table is because the app will have a lot of companies using it as a SaaS and I need to make sure each company only has access to their data. I would assume that having a company_id field in each table would accommodate that.

                          And thank you very much for this helpful information.

                          Comment

                          Working...
                          X