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

Web Dialog Database not talking

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

    #16
    Re: Web Dialog Database not talking

    May be an oversight, but Alpha does properly display/hide options elsewhere. BTW, as a self-described newbie, you are doing very well with the xbasic and components.
    Steve Wood
    See my profile on IADN

    Comment


      #17
      Re: Web Dialog Database not talking

      On the article, note that the section on Login Dialog (capturing login information) is outdated. It won't work if you are building an application that uses the new Security Framework. That's because the new Login component does not allow for custom events.

      S/F has a built in way to capture logins on the Security Config page, or you can put code similar to what's in the article, but directly on the Login.A5W page, in exactly the right spot! But I'd have to expirement to know how that code would look.
      Steve Wood
      See my profile on IADN

      Comment


        #18
        Re: Web Dialog Database not talking

        Let me ask you....
        I have a big flat database of contacts that I actually borrow from an even larger set owned by someone else. The agreement is that I can contact these people for my studies (I'm a memory researcher) as long as I report particular types of changes (phone number, call restrictions, phone/address changes, and a couple others).

        What I need is not just some way to audit when users make changes, but to audit exactly which changes they make. That is, with my web grid, I'd like to save a change record to my changes_table.mdb table that contains username, recordID, name of field changed, and the actual change.

        So, my question is:
        1) Which Event (BeforeValidateExistingRecords, CanUpdateRecord, AFterUpdateRecords, etc.) is the best one to use and
        2) How do I get access to only the fields that changed?

        I'm trying to avoid having to save the value of each field in a session variable and then compare them. Even if I wanted to take this approach, grids (as opposed to dialogs) don't seem to have any sort of Initialize event where I'd setup the "before" values anyway.

        If I'm thinking about this incorrectly, perhaps I'd change my question to: Given my reporting needs (notify someone when certain fields change), how would you go about it with a grid component?

        Thanks in advance

        Comment


          #19
          Re: Web Dialog Database not talking

          If it was my call, id just start with two identical tables, both having the same unique key, do all the editing on one of them and at the end run a report that checks where the tables are different.

          Peter
          Insanity: doing the same thing over and over again and expecting different results.
          Albert Einstein, (attributed)
          US (German-born) physicist (1879 - 1955)

          Comment


            #20
            Re: Web Dialog Database not talking

            That's interesting. I guess I could run my weekly difference report, then copy all changes to the comparison table...then do it all again the next week. That would work. Did you suggest this because it's easy, or because there is no way to do it the way I was thinking?

            Comment


              #21
              Re: Web Dialog Database not talking

              also, how should I approach the report? It's not obvious to me how to filter the report based on a comparison with another table.

              Comment


                #22
                Re: Web Dialog Database not talking

                Don't keep a record of any change as it happens. Periodically compare the original database to the current one, write any field value differences to an audit file.

                EDIT: Peter - I left this post on my screen, went out for the day, came back and posted my thoughts -- apparently I made the same suggestion as you!
                Steve Wood
                See my profile on IADN

                Comment


                  #23
                  Re: Web Dialog Database not talking

                  Until you get the hang of things, try this.
                  Start with your original table (to make this easy ensure all fields are Charcter based).
                  Add a Character field called all_data , make if approx the same size as the total of all field widths (you may get away with half the size) but see how you go.
                  Create a calculated rule for the "all_data" field.
                  it would look something like this.
                  alltrim(field1)+alltrim (field2)+alltrim(field3) or if you want it easy to read alltrim(field1) + " " + alltrim (field2) +" " + alltrim(field3) etc.
                  save the rule
                  right click the table and select to recalc field rules
                  right click again
                  duplicate
                  name this table to indicate this if the file to be edited.
                  use the table when making changes in your grid
                  when you are done
                  just click operations
                  new -and create a post update on the files whe all_data <> all_data from both the tables.
                  Good luck.
                  Insanity: doing the same thing over and over again and expecting different results.
                  Albert Einstein, (attributed)
                  US (German-born) physicist (1879 - 1955)

                  Comment


                    #24
                    Re: Web Dialog Database not talking

                    Cheers, Steve. - Peter
                    Insanity: doing the same thing over and over again and expecting different results.
                    Albert Einstein, (attributed)
                    US (German-born) physicist (1879 - 1955)

                    Comment


                      #25
                      Re: Web Dialog Database not talking

                      Wow, I was just wrote a function that takes a record-number and a fieldname and returns .t. if the passed fieldname is different in the current vs. duplicate the database. I wrote another function that flags the fields in the current table with changed fields I care about. I was going to use this function to filter my report. You're solution is much more elegant, and I'm tempted to switch to it.

                      However, since my functions would only get used when the report was run, doesn't it put less strain on the database than the bigfield approach which would involve recalculating the bigfield every time a change was made? Or does it really matter?

                      I think I might use your approach anyway just for it's simplicity.

                      In any case, I really appreciate the time your advice.

                      Comment


                        #26
                        Re: Web Dialog Database not talking

                        In the end, I used the two functions I mentioned. I filtered the report using a function that checked to see if each record had changed (essentially using a version of Peter's aggregation method). Since the report prints the entire record, I used a more targeted function (did THIS field change) to highlight each field in each record that actually changed.

                        Comment


                          #27
                          Re: Web Dialog Database not talking

                          ...well, it works fine from the designer, but when trying to runt the report from a web dialog, I get a "Function is not recognized" error. Does this mean that user defined functions can't be used in web components?
                          Last edited by drowelf; 09-30-2007, 05:29 PM. Reason: clarification

                          Comment


                            #28
                            Re: Web Dialog Database not talking

                            The web, by design, is not attached to your database other than momentarily when you press submit. The only things on the "Control Panel" that are applicable on the web are Tables, Reports and some (not all) of the Field Rules. Nothing from the Code tab is available from the browser. However, almost anything you write in Code can be lifted and placed in an A5W page as xbasic. It will run when the page is displayed in the browser. YOu can also put that same code in the afterValidate event of a dialog and it fires when you press Submit. All of this takes some practice. It sounds like you put a myfunction() statement in your dialog -- that won't work. But take the same code and copy-paste it directly to the AfterValidate and, after some tweaking, it should work. Note, you cannot use any UI type functions in the web environment, functions that would bring a message box dialog to the screen for instance.
                            Steve Wood
                            See my profile on IADN

                            Comment


                              #29
                              Re: Web Dialog Database not talking

                              Thanks Steve, that makes sense...I'll give that a try.

                              Comment


                                #30
                                Re: Web Dialog Database not talking

                                Hmmm...the Geni generated code to print a report is giving me this error:

                                Internal Error: 3023
                                Bad object handle


                                when it gets to this line of code:

                                filename = report.saveas("weekly_change@[PathAlias.ADB_Path]\pekids_table.ddd","html",filter,order,filename,.f.)


                                I assume the object in question is the report object. Do I need to initialize this object somewhere before using the .saveas method?

                                Comment

                                Working...
                                X