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

get an argument value from grand parent ux in grand child ux

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

    get an argument value from grand parent ux in grand child ux

    Is that possible? Any tips?
    Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

    #2
    Re: get an argument value from grand parent ux in grand child ux

    usually window objects transcend generations, if you can get hold of the argument, then i think pass it on to a window object and access it in the child and/or grand child.
    just a thought.
    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


      #3
      Re: get an argument value from grand parent ux in grand child ux

      Thanks for jogging my memory gandhi, I think I can make it work.
      Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

      Comment


        #4
        Re: get an argument value from grand parent ux in grand child ux

        From a child UX, get a pointer to it's parent. Once you have that pointer, you get use it to get a pointer to it's parent... and so on. You can use these...

        Code:
        {dialog.Object}.getTopParentObject();
        {dialog.Object}.getParentObject();

        Comment


          #5
          Re: get an argument value from grand parent ux in grand child ux

          Thanks David, I have been away from the computer for a while and I get rusty real quick these days. After I started experimenting it started coming back to me.
          What I needed to accomplish is set a default value of a field in a grandchild ux with the value from a grandparent ux field. I have done this many times. I just had a senior moment I guess.
          anyhow this is what I did on the onRenderComplete event of the grandchild ux.

          Code:
          var po = {dialog.Object}.getParentObject();
          var gpo = po.getParentObject();
          var nCID = gpo.getValue('CID');
          var cFileAs = gpo.getValue('FILEAS');
          
          {dialog.Object}.setValue('CID',nCID);
          {dialog.Object}.setValue('FILEAS',cFileAs);
          Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

          Comment


            #6
            Re: get an argument value from grand parent ux in grand child ux

            I would like to go back to my original question. Can I access an argument in a grandparent ux from a grandchild ux? The grand parent ux exists so the arguments that were set in that ux exist somewhere.

            I am using arguments to pass values from parent to child, which is very robust and works well. I would like to continue using arguments throughout my application if possible.

            Another issue I tried is as was discussed in this thread;
            http://www.alphasoftware.com/alphafo...iables-in-a-UX

            I have the pointer to the grandparent ux but I can't find the variable. I get an error indication that it does not exist. Are those items protected in the ux in which they are created?
            Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

            Comment


              #7
              Re: get an argument value from grand parent ux in grand child ux

              gpo.argumentValue('argument_name'); // nice for UX's, but don't know easy way for Grid's

              Comment


                #8
                Re: get an argument value from grand parent ux in grand child ux

                Thanks Rich. I thought I had tried that.
                Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                Comment


                  #9
                  Re: get an argument value from grand parent ux in grand child ux

                  Is this an argument, set in the Child, and passed in via the argument bindings of an embedded UX? If so, I believe the argument lives in the child, not in the parent. It's established in the child and referenced... set... by the parent. Try {dialog.object}.argumentValue('argName'); in the child ux.

                  Do you want this argument client-side or server-side? If server-side have a look at e.arguments as well.

                  Further, how is the argument set? If the argument references a control on the parent, you can use a setting to the parent object with a .getValue() method client-side.

                  Comment


                    #10
                    Re: get an argument value from grand parent ux in grand child ux

                    What I am mainly concerned about is making sure that when I have many tabs with the same ux open, for example the customer edit with different customers in each tab, so that when I open related uxes (child and grand child) I get the correct id's.

                    One reason I am doing this is so that I can dynamically filter lookups in the grand child uxes. Here is a simple example
                    customer
                    -Jobs
                    -Work orders
                    --Purchases
                    -Invoices
                    -etc

                    I have a customer ux that has many related child uxes. In the work order child ux I have many related child uxes. In the purchases child to the work order ux, grandchild to the customer ux I need to filter a lookup for the proper job. I want the lookup to contain only the jobs for that particular customer.


                    I had it working by opening the same uxes with different customers in a new browser tab. Then at some point not sure of what changed the id's started getting messed up. The child and grandchild ids were set to the last opened parent id no matter which browser tab was selected. I was using session variables which was a mistake.

                    This all was working well for grids. But as I was switching over to uxes I was having trouble getting the ids in the same manner. I couldn't seem to find the right event. Mostly due to my lack of understanding all of the features of the ux.

                    Now I am starting to better understand the uxes I can see that there are several ways to get the grandparents id. I would like to know the best method to be sure that I get the correct grandparent id's in the related grandchild ux when there are many grandparent uxes open in different tabs. Is it by accessing arguments set in the child or by getting a pointer to the grandparent and getting the value from a control?
                    Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                    Comment


                      #11
                      Re: get an argument value from grand parent ux in grand child ux

                      Frank,
                      I don't know what the "best" way is for doing this type of thing, but what I do is pass arguments through all the levels of my components even if intermediate components do not need them.

                      Comment


                        #12
                        Re: get an argument value from grand parent ux in grand child ux

                        That is interesting Rich. Do you just pass them to an unbound control?
                        Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                        Comment


                          #13
                          Re: get an argument value from grand parent ux in grand child ux

                          again i would like to bring up the point i did in post #2, if you assign window objects, say window["something"] = "abc" and window["something2"] = "fgh" they are all available in all the components and the singularity is maintained thru out.
                          as long as you have access to the one want to save then window objects are very good till the window is closed. if you need to keep them longer then session variables will be good till the session expires, if you need it longer than session then local storage will be good. with all of these you can skip a generation.
                          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


                            #14
                            Re: get an argument value from grand parent ux in grand child ux

                            Thank you gandhi. Maybe I am missing something but if I use window variables how will I keep them private? If I open the customer edit ux in a tab pane and set a window variable say window['cusID'] with the value of the records id field. Then I open another customer edit ux in another tab pane and set window['cusID'] to the id of that records id field isn't window['cusID'] going to equal the value from the last opened customer edit ux? Isn't the scope of the window variable the browser window?
                            Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                            Comment


                              #15
                              Re: get an argument value from grand parent ux in grand child ux

                              you are correct, i think. opening same component twice was not possible in version 11, may be true in version 12. in that case you are correct. window objects of same lineage will overwrite the last ones. you may have to add additional data to make them private. that i do not know how.
                              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

                              Working...
                              X