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

how do I add an edit, delete buttons to a browse

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

    how do I add an edit, delete buttons to a browse

    I have an embedded browse on a form and I would like to be able to add a delete and an edit button for the row on the browse.

    In the "Placing Dynamic Content into Browse Columns" in the a5v10 web help there is a picture of this at the bottom of the page but this does not seem to be what is being discussed.

    In the a5 sports db sample (new invoice) there is a delete button outside of the browse and you have to select the row and then hit the delete button.

    When I go to task list -> browse controls-> buttons/hyperlinks the choices are open form, print/preview layout, run an operation and generic action.
    I am thinking run an operation or generic action should get me there but I can't seem to get it right.

    Again, what I desire are edit and delete on the browse row. Please advise. Thanks

    #2
    Re: how do I add an edit, delete buttons to a browse

    Add a new calc display field to the form, but assign it a do nothing expression. i.e. set it to a constant value.

    Drag/drop the new calc field to your embedded browse, creating a new column.

    Select the new column and use the right click menu to "Edit Display Format". Use the resulting dialog to design the button.

    Save your work, then select the new column again. This time use the right click menu to select "Events" and find the buttonclick function Alpha built for you. This is where your button code goes.

    Comment


      #3
      Re: how do I add an edit, delete buttons to a browse

      Hi Tom

      I was looking at that button click event function just yesterday and gave up on it through a lack of understanding of how to use it.

      Do you know if there's any help on this anywhere? It seems like a function template. Is that correct?

      I've built a few UDFs but I always know how the parameters are going to be used. With the button click function, how do we use the event, data, etc parameters?
      Kind Regards
      Alan

      Comment


        #4
        Re: how do I add an edit, delete buttons to a browse

        Yes, the "template" constructed for you by Alpha Five for the __on_buttonclick event exposes the data in the parameter list to you automatically. You can access the data in each parameter in the code you write within the function. As an experiment display the data in a series of message boxes to see what's there. What do you find?

        Comment


          #5
          Re: how do I add an edit, delete buttons to a browse

          Tom's description of how to add a button will work. The only issue that tends to come up with me, and I ask if others see this, is after entering the button object info and save, and continue through out to view mode, the button does not actually appear in the browse. This happens often with me. I have found that if you make the button style modern instead of raised, it will show up. Then if you want raised, go back and edit this. Does anyone have this issue?
          Mike W
          __________________________
          "I rebel in at least small things to express to the world that I have not completely surrendered"

          Comment


            #6
            Re: how do I add an edit, delete buttons to a browse

            This has been happening to me in both V9 and V10. Sure hope they fix this cuz it's a BIG, BIG pain. There has been a LOT of wasted time trying to get this to work properly; sometimes an easy fix and sometimes there is no fix.

            It's the little things like this that drive me nuts, things that should have been fixed a long time ago. Another example is when writing code, the code genie say to 'press the down arrow' or 'right click' or 'us the 'press control + down arrow'; and then they sometimes don't work. This has been a problem ever since the Genie came into being. And yes, the mouse is in the right place when doing this.

            kenn

            Originally posted by Mike Wilson View Post
            Tom's description of how to add a button will work. The only issue that tends to come up with me, and I ask if others see this, is after entering the button object info and save, and continue through out to view mode, the button does not actually appear in the browse. This happens often with me. I have found that if you make the button style modern instead of raised, it will show up. Then if you want raised, go back and edit this. Does anyone have this issue?
            TYVM :) kenn

            Knowing what you can achieve will not become reality until you imagine and explore.

            Comment


              #7
              Re: how do I add an edit, delete buttons to a browse

              Hi,

              There are lots of little niggles with putting a button on a browse in V9 and most of these have been overcome in V10. One example was in V9 it became necessary to switch of the Horizontal Scroll bar because the first row did not display the button when form first opened but did when reactivated.

              The place to add your code is below this row: this.Set_Viewport_row(row)

              The code to be entered here must be Xbasic. This can be created for you by the Genie. First you rub the Genie Lamp on the Menu bar, create what you want in Action Script, the Genie converts this to Xbasic, so you press the Insert Code in Script Editor button and the job is done.

              Note: In design mode of the button, if you change from the Default Height then you MUST also change from the Default Width. Even if you are still going to use the same width as default.

              What is really good about this, you can have a number of buttons on the row all firing different events.
              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


                #8
                Re: how do I add an edit, delete buttons to a browse

                I am trying to put the code from a button into a column title event but just copying the working script from the button does nothing in the event for the column button. Does anyone have an example of how the script for this function looks? Does the event have to be preferenced with an

                if a_dlg_button = "My_event_name" ... ?

                Because the name of this event does not appear anywhere in the part the genie created. I am using the v10 Trial.
                Robin

                Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                Comment


                  #9
                  Re: how do I add an edit, delete buttons to a browse

                  Robin

                  First you would open your form that contains the browse (or the standalone browse) in design mode.

                  You would then click on the browse column where you want the button

                  Select properties for that column

                  When the properties opens there is a a button for advanced column title.

                  You click that button and the genie will open "Advance Text Properties". This is where you can change the title of the column as well as put buttons in the column.

                  Don't change the title, just first click on justify - when the prompt comes up I always select "Right" then press the OK button and it will be put into the right hand listbox. Now you would click on button and the button genie will come up. You can change what test is on the button to whatever you want.

                  Then you selelct the check box for custom attributes and set the font etc.

                  You don't really have to do that.

                  Now you go to the bottom of the genie and there is a field for event name - it always defaults to Event1 (I usually call my events with EV_"what is going to do". That creates the trigger in the browse events events.

                  Now press OK then OK again and OK once more to save it to the properties. You will be back to the form in design mode.

                  You would then select browse events events. You will see a function already placed in the script. It will be Function "the name of the column" buttonclick as V etc.

                  Go down to the line after where it show this.set_ viewport()

                  This is where you enter your code.

                  I always start my code with an if statement (if there is more than one function i this event script)

                  if event= "whatever you name the event in the genie"
                  and then insert your code to do what you want when the button on the column title area is pushed for that column.

                  I don't have access to JING right now, but I will when I get home tonight. I can put together a jing presentation to show you the above steps if you want.

                  I hope I have explained this in the detail necessary for you to create a button on column. I don't think I left anything out.

                  Tom Baker

                  Edit:

                  Here is a code example

                  Code:
                  FUNCTION NAME_ButtonClick AS V ( event AS C, data AS C , row AS N )
                  'DESCRIPTION: Fired when a button is clicked on a column.
                  'Arguments:	event	- the name of the event that is fired
                  '			data	- the data in the column cell
                  '			row		- the row number in the browse
                  	'this.SetViewport_Row() sets the current row to the row with the button that was clicked.
                  	this.Set_Viewport_row(row)
                  	if event="ev_find" then
                  	    msgbox("Event","You pushed Find in the Column title")
                  	    
                  	end if
                  END FUNCTION
                  This also works in Version 8 which allows buttons on the column title area as well as on the individual rows of a browse.
                  Last edited by Tbaker; 06-24-2010, 12:24 PM. Reason: added the code for the function

                  Comment


                    #10
                    Re: how do I add an edit, delete buttons to a browse

                    Thank you so much Tom. I messed up while creating the button by going back and changing the genie defaults - which is probably why the genie created the event without my column name (I changed it too). Trial and error works if you are learning from the errors ;)! The starting line in the script was what I was confused about because my button script wasn't doing anything and I didn't need the data and row parameters so it had to be the event parameter I needed to address.

                    BTW compacting a converted v8 table in v10 with a script created in v8 destroys the forms...but that's ok its all practice.
                    Robin

                    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                    Comment


                      #11
                      Re: how do I add an edit, delete buttons to a browse

                      Robin

                      I have an old v8 testing app that has never been touched by V10.

                      I opened it in V8 and created a small script to compact the database.

                      Saved it in v8.

                      The I went to V10.5 and opened the same app. Then ran the script that was created in V8 to compact the database. It ran successfully and then I checked all the forms and they were still there as well as the tables.

                      The script performed the way it should have, no forms were erased etc.

                      Maybe I misunderstood what you had said about the forms being destroyed.


                      Have you upgraded the trial version to the very latest patch 2944-3562?

                      Just a thought, but if it still keeps up I would start a new thread on that and see if anyone else could confirm what you are seeing in the trial version.

                      Tom

                      Comment


                        #12
                        Re: how do I add an edit, delete buttons to a browse

                        Hi Tom,
                        I am sure the trouble was with my form, but I went back to v8 to finish it anyway. Here is what I have done with it so far - thought you might like to see it.
                        Robin

                        Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                        Comment


                          #13
                          Re: how do I add an edit, delete buttons to a browse

                          I know I am years behind using Version 10 but that is where the pocketbook is...

                          I have a form with a browse list of customers. I placed a button in a column and below is the attached code for the button and image of the form. I cannot get the button in the browse column to open the described form "Policy_Basics"


                          BUT, when I place a button on the form (not the browse) attach a script to the button that Zooms To Record it easily zooms to the appropriate record.

                          SUGGESTIONS??

                          Thanks

                          'Date Created: 25-Mar-2016 10:54:21 AM
                          'Last Updated: 25-Mar-2016 12:58:47 PM
                          'Created By : Bob M
                          'Updated By : Bob M
                          FUNCTION NAME_ButtonClick AS V ( event AS C, data AS C , row AS N )
                          'DESCRIPTION: Fired when a button is clicked on a column.
                          'Arguments: event - the name of the event that is fired
                          ' data - the data in the column cell
                          ' row - the row number in the browse
                          'this.SetViewport_Row() sets the current row to the row with the button that was clicked.
                          this.Set_Viewport_row(row)
                          if event="ev_goto" then
                          'Zoom to standard modeless form 'Policy_Basics'.
                          dim Shared varP_ZoomForm as P
                          varP_ZoomForm = topparent.zoom_to_record("Policy_Basics","existing")

                          end if

                          formimage.JPG

                          Comment


                            #14
                            Re: how do I add an edit, delete buttons to a browse

                            I don't have an answer but a suggestion. Did you use the genie to create the code or use the code from another source. If the latter, try using the genie.

                            kenn
                            TYVM :) kenn

                            Knowing what you can achieve will not become reality until you imagine and explore.

                            Comment


                              #15
                              Re: how do I add an edit, delete buttons to a browse

                              Use a different to open the form to the record you want.

                              Either a global variable with a value or open to a value on the source object.

                              Like Kenn said, use the action script genie to give you more ideas of what to do.
                              Al Buchholz
                              Bookwood Systems, LTD
                              Weekly QReportBuilder Webinars Thursday 1 pm CST

                              Occam's Razor - KISS
                              Normalize till it hurts - De-normalize till it works.
                              Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                              When we triage a problem it is much easier to read sample systems than to read a mind.
                              "Make it as simple as possible, but not simpler."
                              Albert Einstein

                              http://www.iadn.com/images/media/iadn_member.png

                              Comment

                              Working...
                              X