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

Record is saved but Submit button is not grayed out

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

    Record is saved but Submit button is not grayed out

    Hello,

    I have an updatable grid. A user changes some data and clicks Submit. I have some simple code in the CanUpdate that runs, basically X = Y+Z. I check the database and the computation is done and the record is saved, however, on my grid the Submit button is still showing. If the user tries to exit the grid it responds with, "You must save or cancel your changes". They can click Submit again but it is making them very confused. Does anybody know why that is happening?
    Attached Files

    #2
    When they click submit the second time, does it work right?

    I don't know what you are doing in the calculation or how you are getting the data in there, but your grid obviously thinks that you are making a change after the submit.

    If you are sure it's all working right, you could always do a reset of the grid in the aftersubmit event. (There is a setting to not ask the user.)

    You might also check your auto-refresh settings for the grid. Do a full page refresh instead and see if that helps.

    Comment


      #3
      Thanks for the reply.

      The code is below, it looks okay to me but maybe you see something I'm not seeing. You may ask why I don't just use the Calculated Field Expression on the Annual_2019...2023 fields, and the reason is, as long as I've used A5 I have always had a problem with that Calculated field expression in that if a user changes a value and then goes straight to [Submit] without first clicking into any other field. The calculation may work on screen but it doesn't get updated in the database. I always have my grids use a Full Page refresh too so I still don't know why that happens to me and yet nobody else, anyway, that's why I do the calculations in the CanUpdateRecord and CanInsertRecord.


      Here's the code I have, it looks okay to me, nothing fancy. There is no other code on Server-side Events or Client-side Events and in fact, no other code anywhere, just that one place. Thanks again for helping.

      function CanUpdateRecord as v (DataSubmitted as P, Args as p, PageVariables as p, Result as p )
      with PageVariables
      Result.Cancel = .f.
      'debug(1)


      Q1_2019 = convert_type(DataSubmitted.Qtr_1_2019,"n")
      Q2_2019 = convert_type(DataSubmitted.Qtr_2_2019,"n")
      Q3_2019 = convert_type(DataSubmitted.Qtr_3_2019,"n")
      Q4_2019 = convert_type(DataSubmitted.Qtr_4_2019,"n")

      DataSubmitted.Annual_2019 = Q1_2019+Q2_2019+Q3_2019+Q4_2019

      Q1_2020 = convert_type(DataSubmitted.Qtr_1_2020,"n")
      Q2_2020 = convert_type(DataSubmitted.Qtr_2_2020,"n")
      Q3_2020 = convert_type(DataSubmitted.Qtr_3_2020,"n")
      Q4_2020 = convert_type(DataSubmitted.Qtr_4_2020,"n")

      DataSubmitted.Annual_2020 = Q1_2020+Q2_2020+Q3_2020+Q4_2020

      Q1_2021 = convert_type(DataSubmitted.Qtr_1_2021,"n")
      Q2_2021 = convert_type(DataSubmitted.Qtr_2_2021,"n")
      Q3_2021 = convert_type(DataSubmitted.Qtr_3_2021,"n")
      Q4_2021 = convert_type(DataSubmitted.Qtr_4_2021,"n")

      DataSubmitted.Annual_2021 = Q1_2021+Q2_2021+Q3_2021+Q4_2021

      Q1_2022 = convert_type(DataSubmitted.Qtr_1_2022,"n")
      Q2_2022 = convert_type(DataSubmitted.Qtr_2_2022,"n")
      Q3_2022 = convert_type(DataSubmitted.Qtr_3_2022,"n")
      Q4_2022 = convert_type(DataSubmitted.Qtr_4_2022,"n")

      DataSubmitted.Annual_2022 = Q1_2022+Q2_2022+Q3_2022+Q4_2022

      Q1_2023 = convert_type(DataSubmitted.Qtr_1_2023,"n")
      Q2_2023 = convert_type(DataSubmitted.Qtr_2_2023,"n")
      Q3_2023 = convert_type(DataSubmitted.Qtr_3_2023,"n")
      Q4_2023 = convert_type(DataSubmitted.Qtr_4_2023,"n")


      DataSubmitted.Annual_2023 = Q1_2023+Q2_2023+Q3_2023+Q4_2023


      Result.ErrorHTML = ""
      end with
      end function

      Comment


        #4
        I tried using the grid reset in the after-submit but I'm not seeing an option for silent or not asking the user. I added it as below and it does ask to confirm if I want to undo the edits. Am I using it correctly?


        resetGridPart Method


        Syntax

        {grid.Object}.resetGridPart()

        Description

        Undoes all edits to all records in the Grid part and returns the records to the state before any edits were made. Equivalent to the user clicking the 'Cancel' button in the Grid toolbar.

        Comment


          #5
          One last thing. If I remove that code it still happens in both 7902 and 8000

          Comment


            #6
            I have had that happen on several occasions - in my case, they were grids - and I ended up rebuilding them which fixed the issue. So i do not know what actually causes this to happen occasionally
            Gary S. Traub, Ph.D.

            Comment


              #7
              Hi Gary, yes, mine are grids also. I suppose I will have to recreate them and hope the new one works.

              Thanks.

              Comment


                #8
                What I did in those cases, was copied the SQL query that I created in the misbehaving grid, and then just added a few fields to be sure I could click Submit and see that it saved and disabled the button. Once I verified that, I started adding back all the functionality, testing at every step. There are also times that I create my own Submit and Reset buttons, using Action javascript, and then using:

                grid.isRowDirty = true

                in the enable expression of the button.
                Gary S. Traub, Ph.D.

                Comment


                  #9
                  Thanks Gary, I will try this tomorrow.

                  Comment


                    #10
                    Hi Gary. I created a new grid; just moved all the fields over and nothing else, no code or anything - same problem. Change one field - immediately click [Submit] without moving to another field and although it saves the value to the database it is still requiring me to click [Submit] again. If I move out of the field being edited and then click [Submit] then it does seem to work but I can't guarantee a user is going to do that. There is absolutely nothing going on, no code, no calculated fields, nothing. All I did was move the fields to the grid and test.

                    I will try adding my own Submit and Cancel buttons as you also suggested.

                    Comment


                      #11
                      One of the many fields could be the culprit. I would suggest just starting the grid with your SELECT statement from the misbehaving grid, and then just add 1 or 2 fields. Be sure you make grid editable, or the detail view if using that. Then try saving the grid. Does it work in working preview?
                      Gary S. Traub, Ph.D.

                      Comment


                        #12
                        I added my own submit and cancel buttons to my test grid and it seems to be working. I then did the same to my "real" grid and it works there too (I also removed the Alpha submit button). Creating those buttons just never occurred to me even though I have done that on other grids. Thanks for that. Now, do you know how to center those buttons? :) Thanks.

                        Comment


                          #13
                          I am happy that you got it to work.

                          To center your new submit buttons, just edit the toolbar template ...
                          Gary S. Traub, Ph.D.

                          Comment

                          Working...
                          X