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

Values from Grid to Dialog2

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

    Values from Grid to Dialog2

    I've been searching the board today along with re-watching videos, but I still can't seem to find the answer for this.

    I have a simple grid. On it I placed a button which, when pressed, brings up a Dialog2 component with a template for sending out an email.

    All of this is working. Problem is, that I am stumped as to how to populate the email fields i.e. the "To", "From" and "Subject" fields. To and From are contained in the grid, while Subject could be hard coded in.

    I've tried arguments and JS, but either I'm not putting them in the proper place or something else is going on. I also tried setting the fields to session variables, but I couldn't get that to work either.

    Given the fact that email is so often used it would have been nice to have this as it's own component.

    Thanks for any pointers.

    #2
    Re: Values from Grid to Dialog2

    Hey,

    Try placing this type of js in your onRenderComplete event:

    Code:
    var po = {dialog.Object}.getParentObject();
    if(po) {
      {dialog.Object}.setValue('MYTEXT', po.getValue('MYPARENTTEXT'));
    }

    Comment


      #3
      Re: Values from Grid to Dialog2

      Thanks. I'm assuming that you are assuming that I know what I am doing....which I do not.

      How does this get my value (email address) in the grid over to the dialog2?

      Thanks!

      Comment


        #4
        Re: Values from Grid to Dialog2

        Ha ha. Good one.
        Replace MYTEXT with the name of your Dialog's e-mail field.
        Replace MYPARENTTEXT with the name of your parent grid's e-mail field.
        All uppercase.

        Comment


          #5
          Re: Values from Grid to Dialog2

          Well, I tried it. I put the JS in the onRenderComplete of the dialog2. The name of the variable in the parent is "Email". The name of the variable in the dialog2 is called "to". So this is what I have:
          Code:
          var po = {dialog.Object}.getParentObject();
          if(po) {
            {dialog.Object}.setValue('TO', po.getValue('EMAIL'));
          }
          What I am getting is the load of the dialog2, then a blank pop-up window which I have to close. The field does not get populated.

          Comment


            #6
            Re: Values from Grid to Dialog2

            you can do this in two different ways:
            1> dialog pulling information from the parent grid - using parent_object syntax
            2> parent grid sending information to child dialog - using window object to carry information
            here is the screencast showing both ways, take your pick.
            I will add the code at the end of this post.

            http://screencast.com/t/JhQDxQkdgsV

            http://screencast.com/t/mVjkZgq3

            Code:
            //child dialog pulling information
            var po = {dialog.Object}.getParentObject();
            if (po) { 
            var rn = po._selectedRow;
            var from = po.getValue('G','NAME',rn);
            var to = po.getValue('G','NAME2',rn);
            {dialog.Object}.setValue('NAME1',from );
            {dialog.Object}.setValue('NAME2',to );
            }
            Code:
            //parent grid sending information
            if (window['name1']){
            {dialog.Object}.setValue('NAME1',window['name1']);
             }
             if (window['name2']){
            {dialog.Object}.setValue('NAME2',window['name2']);
             }
            one word of caution if I may,
            in the pop up that comes to fill in the information to open the dialog, scroll down to the bottom and uncheck the property "warn if the component is dirty" if you miss that you will get pesky warning sign "you must save or close " something like that and you will never where it is coming from.
            Last edited by GGandhi; 12-10-2014, 07:25 AM.
            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


              #7
              Re: Values from Grid to Dialog2

              Hey,
              Yes, sorry about leaving out the bit about the selected row...I had hastily copy and pasted the snippet from a file that copied from dialog to dialog without checking the details.

              Similar to how Govindan showed above, your code would be this:

              var po = {dialog.Object}.getParentObject();
              if(po) {
              var rn = po._selectedRow;
              {dialog.Object}.setValue('TO', po.getValue('G', 'EMAIL', rn));
              }

              Comment


                #8
                Re: Values from Grid to Dialog2

                Mr Hoens... let us know how you come out with this. Did what Andy and Gandhi show work for you? I did mine with all built in capabilities of V11 and no added code.

                If interested, drop me a pm and I'll provide you with a link to a test site where you can judge if what I did would apply to you.

                Comment


                  #9
                  Values from Grid to Di

                  No problem. In testing the getTwo code in the Chrome DevTools console, I see the same output as the book.What browser are you using in which you see just function for getTwo?

                  Comment


                    #10
                    Re: Values from Grid to Dialog2

                    This was great! I was away on a military exercise and couldn't respond earlier.

                    I got back last night and saw the message and tried it out. It worked perfectly and the video was over and above! Can't thank you enough for your effort on this. I'm sure it will help many others!!!

                    Charlie

                    Comment

                    Working...
                    X