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

Pass values from grid button to "grand" child grid

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

    Pass values from grid button to "grand" child grid

    Hi,
    Don't laugh plse, but I have the following challenge;
    1. Parent grid with competitor information
    2. Child Grid, called from a button on the competitor grid to view available races
    3. 3rd grid [new record only] to enter a chosen race on the previous grid [with button]


    My challenge is to pass the "competitor" information from the parent grid to the "race entry grid or grand child grid".
    Its easy to pass [lookup] from parent to a second grid, but I cannot pass this information to the 3rd grid.

    How can I achieve this or could you propose a more practical way to do this. Each competitor can enter multiple races and each race entered must have a record of all competitors.

    #2
    Re: Pass values from grid button to "grand" child grid

    At least provide me with some direction of where I can look for a possible solution plse.

    Comment


      #3
      Re: Pass values from grid button to "grand" child grid

      There are many ways to accomplish this. Check out videos M45 and M43 for grids and D15 and D37 for UX components.

      What method are you currently using to pass data from the parent to the child? Do you just need to send a snapshot of some parent data or do you not know which data to send until the grandchild component is opened? Is the data just flowing in one direction from parent to child to grandchild?

      Comment


        #4
        Re: Pass values from grid button to "grand" child grid

        Thanks for responding DaveF

        I need to send a snapshot of some parent data.

        Just a bit more clarification;
        My system has a competitor table/grid, a event table/grid and a entry table/grid

        The event table has records that is not linked to ANYTHING as and when the records are created.
        The process I have is for;

        1. a competitor to click a button on the competitor's grid which opens all the events created.
        2. They choose an event by clicking on a button on the events grid which opens the entry grid

        I have no issue linking the events record to the entry record, BUT my issue comes with linking the competitor to the same entry.

        CATCH
        I have it working correctly by using session variables and the "logged on" username is passed to both the events and entry grids. NO challenge here.

        The challenge is if the "Team Manager" [different logged on user], needs to enter his competitors in the various events. NOW I cannot use the session variables anymore. The wrong "logged on user information will be passed to the entry form for a competitor.

        I need the "team manager" to be able to register his competitors for different events. He does click on the correct competitor grid row, view the events, click on the "entry button" and .......... the competitor information is not passed to the entry form.

        Comment


          #5
          Re: Pass values from grid button to "grand" child grid

          Anybody who can assist with this.

          CATCH
          I have it working correctly by using session variables and the "logged on" username is passed to both the events and entry grids. NO challenge here.

          The challenge is if the "Team Manager" [different logged on user], needs to enter his competitors in the various events. NOW I cannot use the session variables anymore. The wrong "logged on user information will be passed to the entry form for a competitor.

          I need the "team manager" to be able to register his competitors for different events. He does click on the correct competitor grid row, view the events, click on the "entry button" and .......... the competitor information is not passed to the entry form.

          Comment


            #6
            Re: Pass values from grid button to "grand" child grid

            Have you also seen these new videos?


            The ability to re-use components and open a child component in a window, div, TabbedUI pane, Panel, or embed into a parent component is one of the most powerful aspects of the Alpha Anywhere architecture.

            When you open a component from a parent component, you will often want to get a pointer to the child component so you can manipulate it in your Javascript code in some way. For example, you might want some code in the parent component to read a control in the child, or set a value in the child. Similarly, you might want some code in the child component to read or set a control in its parent.

            The .getParentObject() and .getChildObject() methods are used to get pointer to an object's parent or child objects.

            In this video, we show how this is done.

            Watch Video - Part 1
            Watch Video - Part 2
            Download Component



            A common pattern when building mobile applications is to break the application into multiple sub-components and then embed child components into the parent component. Using this pattern, you break your application into manageable pieces. However, when you follow this pattern, it is often necessary to synchronize the embedded child component when a value in the parent component changes.

            In this video we show a sample application that shows customers in the sample Northwind database. An embedded UX component shows the orders for the selected customer. When the user selects a different customer, the embedded 'Orders' UX component is synchronized.

            Watch Video - Part 1
            Watch Video - Part 2
            Watch Video - Part 3
            Download Components (requires a connection string called 'Northwind' that points to the sample Northwind.mdb files database in the MDBFiles folder).



            Communicating Between Components

            When you break a single UX component into multiple components, then 'communicating' between components is more challenging. For example, say that you have some code in the parent component that needs to read a value from a control in a child component, or you have some code in the child component that needs to read or set a value in a control in the parent component.
            If the application is constructed as a single large UX component, then it is obviously very easy because all controls are in the same 'namespace'. So, to set the value in a control called 'SHIP_ADDRESS', with the value in a control called 'BILL_ADDRESS' you might use this code:

            var address = {dialog.object}.getValue('BILL_ADDRESS');
            {dialog.object}.setValue('SHIP_ADDRESS',address);

            But if the 'BILL_ADDRESS' control is in the parent UX and the SHIP_ADDRESS is in the child UX, and the button that invokes the action is in the parent component, then your code will need to be a little more complex.
            Assume that the child UX component was assigned the alias 'UXCHILD1'. You can then use a built-in placeholder to reference the child UX component.
            The code in the parent component can use this built in placeholder to reference the child UX component:
            {dialog.EmbeddedDialog_[DialogAlias]}

            where, [DialogAlias] is the alias of the child UX component.
            So, in the particular case when the alias of the child UX component is 'UXCHILD1', the placeholder would be:
            {dialog.EmbeddedDialog_UXCHILD1}

            And the could would become:

            //read the value of the control in the parent component
            var address = {dialog.object}.getValue('BILL_ADDRESS');
            //set the value of the control in the child component
            {dialog.EmbeddedDialog_UXCHILD1}.setValue('SHIP_ADDRESS',address);

            It is also possible that you might have some code in the child UX component that need to set the value of a control in the parent component, or invoke some other method of the parent component. For example, assume than in the above example the 'BILL_ADDRESS' field is in the child component and the code is also in the child component. Assume that the 'SHIP_ADDRESS' field is now in the parent component. Here is how your code would be written:

            var address = {dialog.object}.getValue('BILL_ADDRESS');
            //get a pointer to the child UX component's parent object
            var parentObj = {dialog.object}.getParentObject();
            //call the .setValue() method of the parent object.
            parentObj.setValue('SHIP_ADDRESS',address);

            Comment


              #7
              Re: Pass values from grid button to "grand" child grid

              Thanks Dave,

              Let me study a bit. Will update you

              Comment


                #8
                Re: Pass values from grid button to "grand" child grid

                Cornelius,
                Nope, it is no laughing matter: Passing information from one component to another is the messiest thing in Alpha and it would really be nice if Alpha would offer a simple unified approach that worked in every situation and worked the same way for UX's, Grids, etc. The problem, like you mentioned, is trying to pass information beyond the second component.

                What we need from Alpha is more built-in Javascript and xbasic functions for extracting and manipulating Base Filter, User Filter, Link, Order and Arguments data. Sometimes I use Working Preview to examine the data available in the second component, find the passed in data, and write an extraction routine to capture that data. Sometimes when calling a Grid I just revert to passing data via a session variable (which I really hate doing - see below) by using the "Override Settings / [Set Session Variable]" property in the Open Grid Genie.

                There are solutions for passing data between components in the training videos and from various experts that are not 100% reliable. You will find solutions that will fail when put into a Tabbed-UI interface because they don't handle the case where the same component can be opened multiple times (Javascript Global Variables). You will find solutions that fail because the browser might decide to cache information (session variables). You will find solutions that try to use a sql database table to pass information, but could fail due to asynchronous nature of browser, server and sql.

                Comment

                Working...
                X