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

Parent Record not Saving HELP!!! please

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

  • Parent Record not Saving HELP!!! please

    I'm using the following code. It's in an on click event on the child row.
    The code does change the two fields on the parent row, but they do not get saved. and change back to what they were to start with.

    {grid.Object}.submitGridPartRow({Grid.RowNumber});
    var po={grid.Object}.getParentObject();
    var sl={grid.Object}.getValue('G','Store_Location',{Grid.RowNumber});
    var st={grid.Object}.getValue('G','Stock_Number',{Grid.RowNumber});
    po.setValue('D','Store_Location',sl);
    po.setValue('D','Stock_Number',st);
    po.submitGridPart();

  • #2
    Re: Parent Record not Saving HELP!!! please

    po.setValue('D','Store_Location',sl);
    po.setValue('D','Stock_Number',st);
    D refers to detail part,
    if you are submitting detail then
    po.submitDetailView();
    if not
    po.setValue('G','Store_Location',sl);
    po.setValue('G','Stock_Number',st);
    po.submitGridPart();
    should work
    if still not saving then you have to make them dirty.
    take a look at the syntax in the grid component itself.
    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: Parent Record not Saving HELP!!! please

      That did not work. The parent is a grid (one record at a time) with the child being a linked grid.

      Using 'G' in the po.setValue does not change the values at all. Using 'D' changes them until the grid is refreshed.

      Comment


      • #4
        Re: Parent Record not Saving HELP!!! please

        The parent is a grid (one record at a time)
        that is detail view so you have to use the example i gave for the detail view
        po.submitDetailView();

        Code:
        {grid.Object}.submitGridPartRow({Grid.RowNumber});
        var po={grid.Object}.getParentObject();
        var sl={grid.Object}.getValue('G','Store_Location',{Grid.RowNumber});
        var st={grid.Object}.getValue('G','Stock_Number',{Grid.RowNumber});
        po.setValue('D','Store_Location',sl);
        po.setValue('D','Stock_Number',st);
        po.submitDetailView();
        the corrected code for your example.
        Last edited by GGandhi; 10-20-2015, 08:32 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


        • #5
          Re: Parent Record not Saving HELP!!! please

          I tried the changes you sent and it doesn't even change the parent fields at all. I looked at the settings of the parent form and it is a grid.

          Comment


          • #6
            Re: Parent Record not Saving HELP!!! please

            that cannot be.
            single forms are grid with detail view.
            grid part gets hidden right away the detail part is shown.
            i will try to post a screen cast little later.
            thanks for reading

            gandhi

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

            Comment


            • #7
              Re: Parent Record not Saving HELP!!! please

              http://screencast.com/t/wYUvrRBSgMr
              here is a partial screencast it is the detail view to submit
              your code originally changed the value with setValue all you need to do is submit detailview();
              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


              • #8
                Re: Parent Record not Saving HELP!!! please

                i corrected your code and gave you the correct ending in post #4, please tell me that did not work so i know.
                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: Parent Record not Saving HELP!!! please

                  First, thanks for your help.

                  I think I see my problem. I'm using a Grid, Form. It does not have a detail view.

                  My question is, can it be fixed using the grid I've already built. multiple tabs, several fields with special settings.

                  Or do I need to change it to a grid with detail view like you showed me in your screen cast.

                  Screenshot - 10_20_2015 , 11_04_59 AM.png

                  Comment


                  • #10
                    Re: Parent Record not Saving HELP!!! please

                    It is only a grid. That must be why your code in #4 didn't work.

                    Screenshot - 10_20_2015 , 11_19_42 AM.png

                    Comment


                    • #11
                      Re: Parent Record not Saving HELP!!! please

                      i see now, see it helps when you show what you have.
                      i don't think you need to revise at least for now.
                      the stuff about
                      po.setValue('D','Store_Location',sl);
                      po.setValue('D','Stock_Number',st);
                      also does not make sense
                      if it is grid then 'G' should work and you said it did not work, so everything led me somewhere not good.
                      for now you don't change anything i will try to workout a screencast in about an hour or so to see how that can be done.
                      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


                      • #12
                        Re: Parent Record not Saving HELP!!! please

                        That is why I know it has to be something real simple, that we are both somehow missing. 'G' doesn't work even though it is a grid. 'D' does work even though it is not a detail view. There is one other thing. There are two tabs on the Parent form. The fields I'm trying to change are on the first tab, and the child form is on the second tab. Would that be an issue?

                        Comment


                        • #13
                          Re: Parent Record not Saving HELP!!! please

                          Code:
                          {grid.Object}.submitGridPartRow({Grid.RowNumber});
                          var po={grid.Object}.getParentObject();
                          var sl={grid.Object}.getValue('G','Store_Location',{Grid.RowNumber});
                          var st={grid.Object}.getValue('G','Stock_Number',{Grid.RowNumber});
                          po.setValue('G','Store_Location',sl);
                          po.setValue('G','Stock_Number',st);
                          po.submitGridPart();
                          now you are referencing all to a grid part see if that works, in the meantime.
                          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: Parent Record not Saving HELP!!! please

                            Originally posted by kstans View Post
                            That is why I know it has to be something real simple, that we are both somehow missing. 'G' doesn't work even though it is a grid. 'D' does work even though it is not a detail view. There is one other thing. There are two tabs on the Parent form. The fields I'm trying to change are on the first tab, and the child form is on the second tab. Would that be an issue?
                            doubt it.
                            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


                            • #15
                              Re: Parent Record not Saving HELP!!! please

                              http://screencast.com/t/tVYQp0j7
                              take a look at this screencast.
                              the missing link in the problem is the row number.
                              for grids you need row number for search and detail you do not.
                              my example is just that to show you why row number is relevant.
                              you need to modify to your code.
                              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