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

    #16
    Re: Memo Control

    i just did that the thing works great on ur test
    tbl = table.current(6)
    i read somewhere that in a set parent is 1 child 2,3,4,5 so on doing that i get no error but no text writes to the memo field
    i have 8 tables in a set one to one cascading changes. the mitigation_memo field in on the table called notes
    notes is the 6th branch in the set
    https://www.housingeducator.org
    k3srg

    Comment


      #17
      Re: Memo Control

      something i did got it working
      i think
      i went to a different record
      and seems to be working
      can u help me make a date() and time() stamp with user_name()
      like date time start on the add note and a stop time when i click save? If you don't have the time i'll keep playing till i figure it out
      i'm so glad to get this far with the add note the boss will thank you
      Last edited by steve745; 10-02-2008, 10:56 PM.
      https://www.housingeducator.org
      k3srg

      Comment


        #18
        Re: Memo Control

        Steve

        Are you using parentform.refresh_layout() to refresh the form?


        You are correct in your statement on the parent and children - the parent is table 1 and the children are next in line.

        You may want to try table.get("notes") instead of table.current(6). The both provide pointers to the notes table - but table.get("notes") always refers to the notes table - table.current(6) will refer to the notes tables as long as the set order has not changed. Personally I prefer table.get over table.current() (just a personal choice).

        Tom

        Comment


          #19
          Re: Memo Control

          wonderful this is how it is written the reason it came about is so reps can't delete not but to only add to them so i set the object as read only on the form and all fires good so far.
          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


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

          parentform.Refresh_Layout()
          end if
          END IF
          https://www.housingeducator.org
          k3srg

          Comment


            #20
            Re: Memo Control

            this is the very first bit of code i have ever messed with and i see this will make a very flexible database
            Last edited by steve745; 10-02-2008, 11:06 PM. Reason: typo
            https://www.housingeducator.org
            k3srg

            Comment


              #21
              Re: Memo Control

              Steve

              In this line of code
              Code:
               newmemo = tbl.mitigation_memo + crlf(2) + p.text
              change it to read

              Code:
              newmemo = tbl.mitigation_memo + crlf(2) + p.text +" "+now()
              That will give you date followed by the time that the memo add was saved to the notes table , ie "10/02/2008 11:07:22 66 pm"

              As far as user_name, you can add that after now() with + " " + User

              How do you log on to the app? Do you use the windows login user name or do you have your own security log in? How you log in and set up the variable for the user is what you would put at the end where it say "+ user"

              Hope this is what you want.

              Tom

              Comment


                #22
                Re: Memo Control

                a5 security looks like it will help al ot thanks for you time i really appericate it.
                REALLY
                https://www.housingeducator.org
                k3srg

                Comment


                  #23
                  Re: Memo Control

                  Steve

                  I'm glad that I could be of some help to you.

                  Good luck with your app.

                  Tom Baker

                  Comment


                    #24
                    Re: Memo Control

                    if the memo field is blank it won't post new notes is there a way around that
                    thats where my error was once i manually typed in the memo field then click the button everything worked like i wanted
                    https://www.housingeducator.org
                    k3srg

                    Comment


                      #25
                      Re: Memo Control

                      Move the second last line 'end if' to above the tbl.change_begin. As you have it now the the writing of the new value is dependent on the inner most if statement.
                      Tim Kiebert
                      Eagle Creek Citrus
                      A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                      Comment


                        #26
                        Re: Memo Control

                        I love this message board thank you works great
                        https://www.housingeducator.org
                        k3srg

                        Comment


                          #27
                          Re: Memo Control

                          now is there a way that i can also have the now() and user_name() put on push like to time the start of the memo
                          https://www.housingeducator.org
                          k3srg

                          Comment


                            #28
                            Re: Memo Control

                            Originally posted by steve745 View Post
                            now is there a way that i can also have the now() and user_name() put on push like to time the start of the memo
                            Steve,

                            it is not clear to me what you mean by this. Tom in post 21 of this thread showed us how to add the the date/time stamp and user name. Do you want a different format or functionality?
                            Tim Kiebert
                            Eagle Creek Citrus
                            A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                            Comment


                              #29
                              Re: Memo Control

                              Hi All

                              I thought that someone may find the way I write to my memo fields useful

                              I make sure the Memo field is read only then use a xdialog box for writing the memo I also capture at this time the Used Name and now().

                              I also force the a5_spellcheckstring() to do its thing then write the memo away and put the field back to read only

                              script below

                              Andy


                              DIM SHARED vtravelid AS c
                              vtravelid = parentform:Traveler_id.value
                              DIM SHARED Vmfnumber AS c
                              Vmfnumber = parentform:Mf_number.value

                              'Create an XDialog dialog box to prompt for parameters.
                              'In order to evaluate expressions using the eval() function, in the context of
                              'the current form, the "form_name" variable is defined.
                              DIM form_name as C
                              if is_object(topparent.this) then
                              form_name = topparent.name()+".this"
                              else
                              form_name = ""
                              end if
                              DIM SHARED VAddmemo as C
                              DIM SHARED vUser_m as C
                              DIM SHARED newDate as C
                              DIM SHARED varC_result as C
                              DELETE expression_result
                              expression_result = eval("\"\"",form_name)
                              VAddmemo = convert_type(expression_result,"C")
                              DELETE expression_result
                              expression_result = eval("Var->vUser_name",form_name)
                              vUser_m = convert_type(expression_result,"C")
                              DELETE expression_result
                              expression_result = eval("now()",form_name)
                              newDate = convert_type(expression_result,"C")
                              ok_button_label = "&OK"
                              cancel_button_label = "&Cancel"
                              varC_result = ui_dlg_box("User Memo",<<%dlg%
                              {region}
                              Please Enter New Data:| [%mw%.80,10VAddmemo];
                              | [.40vUser_m];
                              | [.40newDate];
                              {endregion};
                              {line=1,0};
                              {region}
                              <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
                              {endregion};
                              %dlg%)

                              'This action has been commented out.
                              ' 'Disallow editing of records in current form at parent level.
                              ' topparent.allow_change(.f.)

                              'Allow editing of records in current form at parent level.
                              topparent.allow_change(.t.)

                              'This action has been commented out.
                              ' 'Disallow editing of records in current form at parent level.
                              ' topparent.allow_change(.f.)

                              'Insert text into a memo field: 'User_memo' in current window.
                              Dim TextToInsert as c
                              Dim InsertPos as n
                              TextToInsert = a5_eval_expression("=chr(10)+\"____________________________________________________\"+chr(10)+Var->vUser_m+\" \"+Var->newDate+chr(10)+\"____________________________________________________\"+chr(10)+chr(10)+Var->vaddmemo")
                              TextToInsert = crlf()+a5_spellcheckstring(TextToInsert,"text","",.t.,"","")
                              InsertPos = -1

                              Dim TempObj as p
                              dim readonly_flag as l
                              'Get a pointer to the Object on the Form/Browse that has the memo field.
                              TempObj = obj(topparent.name(16)+":"+"User_memo")
                              'Check if the RTF memo is readonly
                              readonly_flag = TempObj.field.readonly
                              if readonly_flag = .t. then
                              ui_msg_box("Error","Cannot insert text into Memo field '"+"User_memo"+"' because it is read-only",UI_STOP_SYMBOL)
                              end
                              else
                              Dim MemoText as c
                              MemoText = TempObj.text
                              If InsertPos = 1 then
                              MemoText = TextToInsert + MemoText
                              Else if InsertPos = -1 then
                              MemoText = MemoText + TextToInsert
                              Else
                              MemoText = substr(MemoText,1,InsertPos - 1 ) + TextToInsert + substr(MemoText,InsertPos)
                              End If

                              'Now set the Memo field's text property to the next text..
                              TempObj.text = MemoText

                              'Now activate the memo
                              tempobj.activate()
                              '...and set the insertion point in the memo field after the inserted text
                              if InsertPos = -1 then 'inserting at end of field
                              tempobj.topparent.cursor_set(9999999)
                              else
                              tempobj.topparent.cursor_set(InsertPos + len(TextToInsert))
                              end if
                              end if

                              'Disallow editing of records in current form at parent level.
                              topparent.allow_change(.f.)

                              'Save record in current form at parent level.
                              topparent.commit()

                              Comment


                                #30
                                Re: Memo Control

                                i wanted to date and time stamp when you click add note, that way you have time started and time stoped
                                the now() i have is after i hit save in memoeditor. i want to put now() before the add note line if that makes any sense
                                https://www.housingeducator.org
                                k3srg

                                Comment

                                Working...
                                X