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

time entry seconds

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

    #16
    I've attached a screen shot of a working example of what you want. I have a table with two fields with a browse formatted with time in 24 hour format. I created a UX component bound to that table and formatted to show the time in 24 hour format. I call the UX component in a script using action scripting. I did this using AA build 2999 which is a pretty old build. The entries in the browse were made by pressing the New Entry button, using the date picker and the drop down time picker and then pressing the save button.
    Attached Files
    Alpha 5 Version 11
    AA Build 2999, Build 4269, Current Build
    DBF's and MySql
    Desktop, Web on the Desktop and WEB

    Ron Anusiewicz

    Comment


      #17
      This attachment is a proof of concept project.
      There is no particular style, but it has the basic funcitonality.
      As I was putting it together, it became apparent that grids, not UX's, can be put on
      a regular form. timetest.zip
      Gregg
      https://paiza.io is a great site to test and share sql code

      Comment


        #18
        Ron,
        If you don’t mind could you please share what you did like Dave did? This is great learning material as I never venture over to the web side of things in Alpha 5.

        Thanks Dave for your data. Thanks everyone!

        Comment


          #19
          I meant Alpha Anyywhere V12

          Comment


            #20
            Paul, given that the entries are from another document, faffing around pressing buttons to bring up dates and times might get annoying if the information is in front of you.
            The attached is uber simples!
            Note the Date entry option, [in the flyover of the Date field] which is much, much quicker than opening the Calendar and finding a date.
            It's probably easier to maintain if not as pretty as the others.

            Ted

            timetest.zip
            Attached Files
            See our Hybrid Option here;
            https://hybridapps.example-software.com/


            Apologies to anyone I haven't managed to upset yet.
            You are held in a queue and I will get to you soon.

            Comment


              #21
              MadTowing: I'd be interested in learning how to use your UX control in a desktop app. Can you point me to some examples or reference materials? Thanks. -- tom

              Comment


                #22
                Tom,
                Create a Grid in the windows section an add it into a Supercontrol on the Form.
                Is that what you meant?
                See our Hybrid Option here;
                https://hybridapps.example-software.com/


                Apologies to anyone I haven't managed to upset yet.
                You are held in a queue and I will get to you soon.

                Comment


                  #23
                  not sure I understand your goal, but this is my solution
                  dim global ntime as n
                  ntime=toseconds(time())
                  this gives you the number of seconds past midnight
                  from that you can determine the time, and do an if
                  if ntime = 2500
                  do something
                  elseif ntime= 5315
                  do something else
                  end if
                  Cole Custom Programming - Terrell, Texas
                  972 524 8714
                  [email protected]

                  ____________________
                  "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                  Comment


                    #24
                    For Tom Cone Jr, and anyone else that is interested.
                    While you can't open a UX from a desktop form, you can open a grid from the desktop form, and the from the grid, you can open a UX.
                    In my test case, I set the on-click action for the first field of the grid to open the UX. I didn't do much more because it was just a proof of
                    concept type thing and I'm really just at the point where making up controls, tables, and data is testnig the limit of my creativity right now
                    as I try to get other things done as well, but if that information is provided, I'm certainly willing to push further.
                    Gregg
                    https://paiza.io is a great site to test and share sql code

                    Comment


                      #25
                      Attached is a working example of using a UX component on the desktop. This was developed using the current stable build of Alpha Anywhere, Build 7564. I could have used a different Build except nowhere in this post did anyone stipulate which Build they were using. Likewise, it is assumed that we are working with DBF tables and not SQL tables.

                      I have a single form, a single browse and a single UX component. The form has the named browse on it. The single button calls a script from the code tab. The script was created using Action Scripting and loads the Web Component on to the desktop.

                      The Web Component allows for edits, adding a new entry and deletes. It has both a date and time picker, the time picker in 24 hour and seconds. As we are working with DBF files, one has to write their own xbasic code to manipulate the data, placing this xbasic code in the Server-side afterDialogValidate event.

                      Regarding Deletes, I opted to add a logical field to the table Called hide. A deleted record will be T and an active record will be F. The form, Browse and UX have a Filter, “Hide=.F.” The Primary Key is a numeric auto-increment field called “PK”. The xbasic code honors the field rules using the argument .t. in the t.enter_begine(.t.) function.

                      The UX when opened may fill most of the screen. It can be resized and is configured to remember it’s size and location.

                      This is just a proof of concept exercise which could use a little more polish. The list doesn’t resort after a new entry has been added. Maybe someone can show us how to do that.

                      Server-side afterDialogValidate code



                      Code:
                      dim vn_pk as N
                      vn_pk = convert_type(e.datasubmitted.PK,"N")
                      
                      if e.datasubmitted.HIDE = "true" then
                      'hide current record
                      dim t as P
                      t = table.open("datetime")
                      t.order("PK","PK=" + vn_pk)
                      t.change_begin(.t.)
                      t.hide = e.datasubmitted.HIDE
                      t.change_end()
                      t.close()
                      END
                      end if
                      
                      'convert submitted character object to date value
                      dim vd_date as d
                      vd_date = convert_type(e.datasubmitted.DATE, "D")
                      dim vt_time as t
                      vt_time = ctot(e.datasubmitted.TIME)
                      
                      if vn_pk = 0 then
                      'new record
                      dim t as P
                      t = table.open("datetime")
                      'honor field rules
                      t.enter_begin(.t.)
                      t.date = vd_date
                      t.time = vt_time
                      t.enter_end(.t.)
                      t.close()
                      else
                      'edit current record
                      dim t as P
                      t = table.open("datetime")
                      t.order("PK","PK=" + vn_pk)
                      t.change_begin(.t.)
                      t.date = vd_date
                      t.time = vt_time
                      t.change_end()
                      t.close()
                      end if[FONT=Times New Roman][/FONT]
                      Attached Files
                      Alpha 5 Version 11
                      AA Build 2999, Build 4269, Current Build
                      DBF's and MySql
                      Desktop, Web on the Desktop and WEB

                      Ron Anusiewicz

                      Comment


                        #26
                        Thanks Ron!!! When I get home tonight I will have to check this out. Thanks you for providing this. This post has had a lot of discussion with lots of thoughts and code. It is great for learning when your up in your years in age! Thanks again for your help and detailed info on code!

                        Comment


                          #27
                          Thanks, Ron. Much to study and learn from.

                          Q - this is running without web app server being deployed, right?

                          Q - I assume the folder "datetime.webprojects" must be a sub-folder of the ADB workspace, right? Is this by default, or did you move it there from elsewhere?

                          -- tom

                          Comment


                            #28
                            Originally posted by Tom Cone Jr View Post
                            Thanks, Ron. Much to study and learn from.

                            Q - this is running without web app server being deployed, right?

                            Q - I assume the folder "datetime.webprojects" must be a sub-folder of the ADB workspace, right? Is this by default, or did you move it there from elsewhere?

                            -- tom
                            Hi Tom,
                            It runs without the application server and it is best to just leave the UX component where it is in the webproject folder. There you can open the project and add any controls or remove the unwanted ones. The changes will be reflected when you run the form and click the button that calls the script.

                            Comment


                              #29
                              [QUOTE=Ronald Anusiewicz;n931284]Attached is a working example of using a UX component on the desktop. This was developed using the current stable build of Alpha Anywhere, Build 7564. I could have used a different Build except nowhere in this post did anyone stipulate which Build they were using. Likewise, it is assumed that we are working with DBF tables and not SQL tables.

                              I have a single form, a single browse and a single UX component. The form has the named browse on it. The single button calls a script from the code tab. The script was created using Action Scripting and loads the Web Component on to the desktop.

                              The Web Component allows for edits, adding a new entry and deletes. It has both a date and time picker, the time picker in 24 hour and seconds. As we are working with DBF files, one has to write their own xbasic code to manipulate the data, placing this xbasic code in the Server-side afterDialogValidate event.

                              Regarding Deletes, I opted to add a logical field to the table Called hide. A deleted record will be T and an active record will be F. The form, Browse and UX have a Filter, “Hide=.F.” The Primary Key is a numeric auto-increment field called “PK”. The xbasic code honors the field rules using the argument .t. in the t.enter_begine(.t.) function.

                              The UX when opened may fill most of the screen. It can be resized and is configured to remember it’s size and location.

                              [FONT=Times New Roman]This is just a proof of concept exercise which could use a little more polish. The list doesn’t resort after a new entry has been added. Maybe someone can show us how to do that.



                              Hi Ron,
                              Not sure what you mean that it doesn't resort. Are you saying sort by date, record or something else?
                              Nice going on putting that together. I played with it and made some changes to see what happens, etc.....
                              Thanks for taking the time to do this and show everyone !!!!!!

                              Comment


                                #30
                                [QUOTE=datacaster;n931294]
                                Originally posted by Ronald Anusiewicz View Post
                                Attached is a working example of using a UX component on the desktop. This was developed using the current stable build of Alpha Anywhere, Build 7564. I could have used a different Build except nowhere in this post did anyone stipulate which Build they were using. Likewise, it is assumed that we are working with DBF tables and not SQL tables.

                                I have a single form, a single browse and a single UX component. The form has the named browse on it. The single button calls a script from the code tab. The script was created using Action Scripting and loads the Web Component on to the desktop.

                                The Web Component allows for edits, adding a new entry and deletes. It has both a date and time picker, the time picker in 24 hour and seconds. As we are working with DBF files, one has to write their own xbasic code to manipulate the data, placing this xbasic code in the Server-side afterDialogValidate event.

                                Regarding Deletes, I opted to add a logical field to the table Called hide. A deleted record will be T and an active record will be F. The form, Browse and UX have a Filter, “Hide=.F.” The Primary Key is a numeric auto-increment field called “PK”. The xbasic code honors the field rules using the argument .t. in the t.enter_begine(.t.) function.

                                The UX when opened may fill most of the screen. It can be resized and is configured to remember it’s size and location.

                                [FONT=Times New Roman]This is just a proof of concept exercise which could use a little more polish. The list doesn’t resort after a new entry has been added. Maybe someone can show us how to do that.


                                Hi Ron,
                                Not sure what you mean that it doesn't resort. Are you saying sort by date, record or something else?
                                Nice going on putting that together. I played with it and made some changes to see what happens, etc.....
                                Thanks for taking the time to do this and show everyone !!!!!!

                                Comment

                                Working...
                                X