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

Simple genie or simple code to use a button to update an adjacent field in grid

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

    Simple genie or simple code to use a button to update an adjacent field in grid

    Seeking a simple way to assign a function to a toggle-like button to essentially update a field within the same line that the button was pressed.

    What I'm trying to do is have an approval queue where when you want to approve an invoice line listed you would simply click a button on the line you want to approve and when clicking the button the function would capture the username and combine with timestamp to create a digital signature.

    I'm also open to finding out about an already built UX component or something that would accomplish the same.

    Thank you in advance for your help.

    #2
    Re: Simple genie or simple code to use a button to update an adjacent field in grid

    Is this a web app?
    Peter
    AlphaBase Solutions, LLC

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


    Comment


      #3
      Re: Simple genie or simple code to use a button to update an adjacent field in grid

      Yes, thank you.

      Comment


        #4
        Re: Simple genie or simple code to use a button to update an adjacent field in grid

        You can use the button's onClick event with code similar to this:

        Code:
        var row = {Grid.RowNumber};
        var name = {grid.Object}.getValue('G',"NAME_FIELD_HERE",ROW);
        var d = new Date();
        var dt = d.toFormat('MM/dd/yyyy 0h:0m:0s am');
        var name_stamp = name + dt;
        alert(name_stamp );
        But you must understand that this is complex stuff. You need to try to understand what is going on here, otherwise you might not be able to make it work in your situation.
        Peter
        AlphaBase Solutions, LLC

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


        Comment


          #5
          Re: Simple genie or simple code to use a button to update an adjacent field in grid

          Thank you Peter. I certainly will dive into this code and try to make sense.

          Being an advanced application builder in Access, this is a Breeze in Access, but I realized and have been learning over the last few weeks that pretty everything I did in Access is readily available in Alpha, I just have to think about it slightly different and as you see, "understand what is going on" in various "codes"

          Thanks again,

          -Carsell

          Comment


            #6
            Re: Simple genie or simple code to use a button to update an adjacent field in grid

            You might want to look into the check box selector to approve multiple invoices with a button click...
            NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

            Comment


              #7
              Re: Simple genie or simple code to use a button to update an adjacent field in grid

              https://www.youtube.com/results?sear...Column+in+Grid
              NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

              Comment


                #8
                Re: Simple genie or simple code to use a button to update an adjacent field in grid

                Thank you Charles & Peter...however, I'm still struggling with how to just simply update a field by the click of a button. When I go into on-click event, where can I just insert some basic equivalent code I would write in access - [FIELD1]&" - "&now().....which would basically generate a result like - john doe - 8/20/15 8:50am...

                Charles, I would definately be open to using multiple clicks and clicking one button to "mass-update" multiple line items, however I still cannot seem to define which buttons need to get upated with a signature and what the signature is made up of

                In the code above it appears I need to supply the row/column, versus the system identifying the row that is clicked? Again, like I would write in MS Access, "-1" would identify which row is toggled.

                Hopefully this question makes sense.

                Thank you both for your time.

                -Casey

                Comment


                  #9
                  Re: Simple genie or simple code to use a button to update an adjacent field in grid

                  i am just modifying peter's code in post #4.
                  place this following code in the onClick event of the button's inline javascript.

                  Code:
                  var name = {grid.Object}.getValue('G','FIELD_TO COPY FROM',{Grid.RowNumber});
                  
                  var d1 = new Date();
                  
                  d1 = d1.toFormat('MM/dd/yyyy 0h:0m:0s am');
                  
                  var name_stamp = name + '  ' +  d1;
                  
                  {grid.object}.setValue('G', 'FIELD_TO_COPY_TO', {grid.RowNumber}, name_stamp);
                  this is not a complex code by any means, not definitely to anyone experienced in another platform.
                  you get the value of a field you want to add, and select the timestamp you want to add to it, then set the new field to that value combined.
                  what makes it different is this is in web portion, where javascript ploughs the field. so you need to write out the constructors for the name_stamp, (the variables are not kept after displaying the field in the browser)
                  where as in desktop the fields are available (they are all still the memory)and can be added on the fly.
                  please note the capitals in the statement, they are required to be that way.
                  Last edited by GGandhi; 08-22-2015, 06:21 AM. Reason: gave line break in code to display easy on the eyes.
                  thanks for reading

                  gandhi

                  version 11 3381 - 4096
                  mysql backend
                  http://www.alphawebprogramming.blogspot.com
                  [email protected]
                  Skype:[email protected]
                  1 914 924 5171

                  Comment


                    #10
                    Re: Simple genie or simple code to use a button to update an adjacent field in grid

                    Thank you Gandhi, the code seems to work to specs, however can you provide an example of how I can gather the username logged in to incorporate into the code? For example I do happen to have the username populating in the grid under field name "ALPHA_SORT"....should it use an existing field in the capturing the logged username, or should I use alternate coding? I have successfully captured the logged username by utilizing the getusername() function in an immediate redirect page (provided by Peter, thank you again), however if I read your message below correctly, that username was not saved anywhere? How would I go about "Recapturing" the logged in username without using another login component?

                    Thank you in advance for your help again!

                    -Casey

                    Comment


                      #11
                      Re: Simple genie or simple code to use a button to update an adjacent field in grid

                      Gandhi! Nevermind my friend. I got it to work!!

                      I looked more in detail of your code and saw that you defined that variable in the section "FIELD_TO COPY FROM'"

                      This new functionality is huge for me!

                      Thank you again!

                      -Casey

                      Comment


                        #12
                        Re: Simple genie or simple code to use a button to update an adjacent field in grid

                        Ok Ghandi, just to revisit part of your previous post, how would I get the page to recapture the logged username if the username is not currently one of the fields in the current grid?

                        Thanks, Casey

                        Comment


                          #13
                          Re: Simple genie or simple code to use a button to update an adjacent field in grid

                          <%a5
                          ? A5ws_GetCurrentUser()
                          %>
                          Peter
                          AlphaBase Solutions, LLC

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


                          Comment


                            #14
                            Re: Simple genie or simple code to use a button to update an adjacent field in grid

                            Thank you Peter. I was thinking that, however where would I place this code? Would this somehow be embedded within the button's "on click" code that I have been working on in this thread?

                            Thanks again.

                            -Casey

                            Comment


                              #15
                              Re: Simple genie or simple code to use a button to update an adjacent field in grid

                              I have successfully captured the logged username by utilizing the getusername() function in an immediate redirect page (provided by Peter, thank you again)
                              set that variable to a session variable in that page and that session variable will be available thru out your session and you can enter that info into your grid.
                              thanks for reading

                              gandhi

                              version 11 3381 - 4096
                              mysql backend
                              http://www.alphawebprogramming.blogspot.com
                              [email protected]
                              Skype:[email protected]
                              1 914 924 5171

                              Comment

                              Working...
                              X