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

Memo Control

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

    #31
    Re: Memo Control

    Steve

    To add a start date/time you just need to dim a variable

    Code:
     dim v_start as t
    Then insert this line of code after the dim statments

    Code:
     v_start=now()
    Here is the script:

    Code:
    Dim P as P
    dim newmemo as c
    dim v_start as t
    vMode = parentform.mode_get()
    v_start=now()
    IF vMode = "CHANGE" .or. vMode = "ENTER"
    parentform.commit()
    END IF
    
    tbl = table.current() 
    p.text=""
    
    vChoice = a5_memo_editor(p,"mitigation_memo") 
    
    IF vChoice = "save" then
    IF alltrim(tbl.mitigation_memo) = ""
    newmemo = p.text
    ELSE
    newmemo = tbl.mitigation_memo + crlf(2) +v_start+crlf()+p.text+crlf()+now()+" "+user_name()
    end if	
    tbl.change_begin()
    tbl.mitigation_memo=newmemo
    tbl.change_end(.t.)
    
    topparent.Refresh_Layout()
    
    END IF
    Also the code has been changed to reflect Tim's advice on the end if statement.


    Tim - thanks for that change in the end if statement - I was testing and the end if was put in the wrong place. Thanks again for correcting that.

    Tom

    Comment


      #32
      Re: Memo Control

      It's not putting the now() if the field is blank
      it does put the text but no time stamp
      and it doesn't stamp the start time on push put text now()
      something like that and the on the save in memo editor it will put the stamp at the end of the entry to show time spent with editor open
      https://www.housingeducator.org
      k3srg

      Comment


        #33
        Re: Memo Control

        Steve

        See if this works the way you want it

        Code:
        Dim P as P
        dim newmemo as c
        dim v_start as t
        dim user as c ="TOM SR"
        vMode = parentform.mode_get()
        v_start=now()
        IF vMode = "CHANGE" .or. vMode = "ENTER"
        parentform.commit()
        END IF
        
        tbl = table.current() 
        p.text=""
        
        vChoice = a5_memo_editor(p,"mitigation_memo") 
        
        IF vChoice = "save" then
        IF alltrim(tbl.mitigation_memo) = ""
        newmemo = v_start+crlf()+p.text+crlf()+now()
        ELSE
        newmemo = tbl.mitigation_memo + crlf(2) +v_start+crlf()+p.text+crlf()+now()+" "+user
        end if	
        tbl.change_begin()
        tbl.mitigation_memo=newmemo
        tbl.change_end(.t.)
        
        parentform.Refresh_Layout()
        
        END IF
        I guess I'm a little confused

        Tom Baker

        Comment


          #34
          Re: Memo Control

          thanks for the help tom I keep getting closer and closer
          i just need to learn more xbasic so i can fine tune this.
          i gotta put the dbase live so i can't be playing too much with it.
          that part of the code didn't work.
          here is what i am using
          Dim P as P
          dim newmemo as c
          vMode = parentform.mode_get()

          IF vMode = "CHANGE" .or. vMode = "ENTER"
          parentform.commit()
          END IF

          tbl = table.get("notes")
          p.text=""

          vChoice = a5_memo_editor(p,"mitigation_memo")

          IF vChoice = "save" then
          IF alltrim(tbl.mitigation_memo) = ""
          newmemo = p.text
          ELSE
          newmemo = tbl.mitigation_memo + crlf(2) + p.text +" "+now()+" "+user_name()

          end if
          tbl.change_begin()
          tbl.mitigation_memo=newmemo
          tbl.change_end(.t.)

          parentform.Refresh_Layout()

          END IF
          https://www.housingeducator.org
          k3srg

          Comment


            #35
            Re: Memo Control

            Steve

            I took your last script and entered it onto a new form on my test app that was composed of a set (parent style_lu1 - child Notes).

            I then used your code modified as follows:

            Code:
            Dim P as P
            dim newmemo as c
            [COLOR="Red"]dim v_start as t
            v_start=now()[/color]
            vMode = parentform.mode_get()
            
            IF vMode = "CHANGE" .or. vMode = "ENTER"
            parentform.commit()
            END IF
            
            tbl = table.get("notes") 
            p.text=""
            
            vChoice = a5_memo_editor(p,"mitigation_memo") 
            
            IF vChoice = "save" then
            IF alltrim(tbl.mitigation_memo) = ""
            [COLOR="red"]newmemo = v_start+crlf()+p.text+crlf()+now()
            ELSE
            newmemo = tbl.mitigation_memo + crlf(2) + v_start+crlf()+p.text +crlf()+now()+" "+user_name()[/COLOR]
            end if 
            tbl.change_begin()
            tbl.mitigation_memo=newmemo
            tbl.change_end(.t.)
            
            parentform.Refresh_Layout()
            
            END IF
            This works on my test app - I have attached a thumbnail showing what I get when I used this script (it is the bottom memo field)

            Is this what you want?

            Tom

            Comment


              #36
              Re: Memo Control

              works great tom
              one of my ladies brought up a good point. when the editor is open they can't read the other notes written is there a way we can put the previous notes in the editor but as read only? The editor keeps focus
              https://www.housingeducator.org
              k3srg

              Comment


                #37
                Re: Memo Control

                Originally posted by steve745 View Post
                when the editor is open they can't read the other notes written is there a way we can put the previous notes in the editor but as read only?
                Not exactly - but go back to my example. You can have the memo field read only on your form (as in my example), so they can view the prev. notes there. Then use the button code to open the xdialog for the new memo input. Make the read only memo as big as you want on the form.
                Peter
                AlphaBase Solutions, LLC

                [email protected]
                https://www.alphabasesolutions.com


                Comment


                  #38
                  Re: Memo Control

                  Thats what we are doing your code helped me in many ways 1 to understand xbasic a little never used it before i started messing with your code. 2 xbasic offers lots of flexiblity. the memo is set read only on the form like your example, if they are on a call and have to review previous notes the have to close the editor to read them. can the editor open like a split window with field current data on bottom and new text entry area on top is that possible?
                  as i use alpha5 more and more i find that almost anything is possible.
                  https://www.housingeducator.org
                  k3srg

                  Comment


                    #39
                    Re: Memo Control

                    Steve

                    I don't know what your form look like, so don't know how much of the memo field would be visible when the memo editor is open - but you can position the memo editor anywhere on your form (drag it) so that it might not cover the memo field. The only thing is that as long as the memo editor is open you would not be able to use the vertical scroll on the memo field to read all of the lines (presuming that there are a lot of entries) so you would still have to close the memo editor.

                    When you move the memo editor it will remember that position and will reappear at that same location until you exit the application.

                    Tom

                    Comment


                      #40
                      Re: Memo Control

                      Originally posted by steve745 View Post
                      can the editor open like a split window with field current data on bottom and new text entry area on top is that possible?
                      Sorry, not possible.
                      Peter
                      AlphaBase Solutions, LLC

                      [email protected]
                      https://www.alphabasesolutions.com


                      Comment


                        #41
                        Re: Memo Control

                        Steve,

                        As Peter said, it is not possible if you use just the one table.

                        The method I use, which is on a 50 user network, is 2 tables. First for text input, second for viewing only. See thumbnail.

                        This was all taken form Application Programming by Dr Peter Wayne.

                        The user types in the top box and when text is saved, it is appended to the bottom box and then deleted from the top box. So the top box is always ready to take new text. Notice there is also the Users Initials and date and time stamp. The bottom box is Read Only.

                        Both boxes are RTF, which means all font, size, colour and spelling controls are available.
                        Regards
                        Keith Hubert
                        Alpha Guild Member
                        London.
                        KHDB Management Systems
                        Skype = keith.hubert


                        For your day-to-day Needs, you Need an Alpha Database!

                        Comment


                          #42
                          Re: Memo Control

                          wow keith
                          i could make a button just open another form based on current record and see the other notes. wow that is just what i was looking for do i need to make the entry table part of the set or can it be indepenant?
                          https://www.housingeducator.org
                          k3srg

                          Comment


                            #43
                            Re: Memo Control

                            Originally posted by Keith Hubert View Post
                            The method I use, which is on a 50 user network, is 2 tables. First for text input, second for viewing only.
                            Which gets us back to Tom Cone's suggestion (post #2 of this thread).
                            Peter
                            AlphaBase Solutions, LLC

                            [email protected]
                            https://www.alphabasesolutions.com


                            Comment


                              #44
                              Re: Memo Control

                              keith the women in the office are raving over you they are so excited
                              https://www.housingeducator.org
                              k3srg

                              Comment


                                #45
                                Re: Memo Control

                                It is with xdialog. See attached.

                                Are they excited over his physique or his coding skills?
                                Mike W
                                __________________________
                                "I rebel in at least small things to express to the world that I have not completely surrendered"

                                Comment

                                Working...
                                X