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

Xdialog, Xbasic for Data Entry

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

    #16
    Re: Xdialog, Xbasic for Data Entry

    Thank you Keith, I'm confused dialog box or xdialog for one to many data entry?

    Comment


      #17
      Re: Xdialog, Xbasic for Data Entry

      Xdialog is the code that goes behind the Dialog box. Have a look at Learning Xdialog. That is worth all the money spent on Alpha alone.
      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


        #18
        Re: Xdialog, Xbasic for Data Entry

        Originally posted by Mike Wilson View Post
        A house has many openings to the outdoors. There are chimneys, roof vents, windows and doors. Usually there are many windows and certainly it would almost at any instance be most convenient to get to the outdoors through a window. And certainly windows are sometimes demanded to have capabilities for egress. But that's not what a window is for. You can use it as a vehicle to move to and from the outdoors, but it's fraught with issues. There are other objects in your house that are meant and designed for egress. Just look at an embedded browse as a window, and work with it for what it is designed to do best, and you will save yourselves a great deal of grief, and get on with things. That's what Cal and other experienced developers have done. That is what I have done.

        Yes, xdialogs do take a fair amount of time to learn the nuances and controls. But once you have a basic understanding of them, in my experience, it takes me less time to generate a powerful xdialog than it does a form. Because it is code, and you save code in your code libraries. I have 4-6 pre-written xdialog codes that have some different features. I select one of them, tweek the code a bit, and you have data gathering and entry directly to/with tables, that don't even have to be part of the set being worked on, with control and certainty. Even if the embedded browse "window" could flawlessly provide for data entry, I don't think I would go back to try and use it.

        BTW, I wrote in post #7 that in Mark's dialog code, that converting the GMT variable to a literal number would make it run.
        Thank you Mike, Can you please share your 4-6 pre written xdialogs for us newbies to learn?

        Comment


          #19
          Re: Xdialog, Xbasic for Data Entry

          Jetson. My best advice, which I am sure your own experience will reflect;
          that is the first priority is to give the client as close to what they want as possible, taking care of what YOU know or feel they may trip over, without necessarily being easiest/quickest for the programmer.
          Quick and nasty will absolutely, guaranteed, plague you long after installation and use more resources than doing it best first time.
          Test your work critically before installing, if you can break it then redesign.
          If you need to build Xdialogues you can also get pretty far with AS and some mods.
          You can get quite reasonable control with overlaid entry forms, using variables, that mimic dialogues and do the validations before converting to field data.

          Comment


            #20
            Re: Xdialog, Xbasic for Data Entry

            Originally posted by Mike Wilson View Post
            A house has many openings to the outdoors. There are chimneys, roof vents, windows and doors. Usually there are many windows and certainly it would almost at any instance be most convenient to get to the outdoors through a window. And certainly windows are sometimes demanded to have capabilities for egress. But that's not what a window is for. You can use it as a vehicle to move to and from the outdoors, but it's fraught with issues. There are other objects in your house that are meant and designed for egress. Just look at an embedded browse as a window, and work with it for what it is designed to do best, and you will save yourselves a great deal of grief, and get on with things. That's what Cal and other experienced developers have done. That is what I have done.

            Yes, xdialogs do take a fair amount of time to learn the nuances and controls. But once you have a basic understanding of them, in my experience, it takes me less time to generate a powerful xdialog than it does a form. Because it is code, and you save code in your code libraries. I have 4-6 pre-written xdialog codes that have some different features. I select one of them, tweek the code a bit, and you have data gathering and entry directly to/with tables, that don't even have to be part of the set being worked on, with control and certainty. Even if the embedded browse "window" could flawlessly provide for data entry, I don't think I would go back to try and use it.

            BTW, I wrote in post #7 that in Mark's dialog code, that converting the GMT variable to a literal number would make it run.
            Thank you Mike, Can you please share your 4-6 pre written xdialogs for us newbies to learn?

            Comment


              #21
              Re: Xdialog, Xbasic for Data Entry

              Originally posted by Ted Giles View Post
              CAL, my experience is not the same as yours when using a Browse, but maybe because I use Saved Browses with all sorts of lookups on the content - and in a Tabbed Form too.
              Do you have the same problem with saved browses? ...
              I've never really used saved browses. I can't tell you why anymore but I remember trying them and deciding that I much preferred using embedded browses. I do know that the decision at that time had nothing to do with data entry.

              It's very possible that saved browses don't have the same issues. How long have you been doing that? (starting with which version?) Also, have you thoroughly tested them when editing?

              As I recall, the issue with embedded browses was more of an "editing every record" issue than a data entry issue. In other words, if you just arrow down until you find the one record you want to change, there probably won't be a problem. The problem usually occurred when, for example, the user decided to change the "state tax rate" value in every record one at a time.

              I really do hope that someone can convince me that this problem no longer exists. I suppose it's time for me to try it again myself - when I get the time.

              Comment


                #22
                Re: Xdialog, Xbasic for Data Entry

                Jetson,

                Mike's dialog boxes would not be any good for you as they are designed to work in his applications.

                Have a look in your tool box and get stuck in. You will be amazed at how quickly you can do things if you at least make a start.

                Here is a screen shot just to show you where to start with dialog boxes. Once you have built one you should be able to see the xbasic that Alpha generates. With a little experience you can then edit the box to do more things.
                Attached Files
                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


                  #23
                  Re: Xdialog, Xbasic for Data Entry

                  OK Jetson,
                  Here is one. A progressive lookup for customers. place a button on the AlphaSport customer button with customer_search() as on push event and place this as a UDF named customer_search in the code tab.

                  Code:
                  'dialog field variables
                  ' generate dialog
                  
                  	dim vfind_text as C
                  	dim vLNM as C=""
                  	dim vLitem_show as C=""
                  	dim vLitem_f as C=""
                  		
                  	dim vresult as C
                  	dim dlg_title as C="Search"
                  	dim dlg_body as C
                  	dim dlg_code as C
                  	
                  	dlg_body=<<%dlg%
                  	{background=#180,185,185}{font=arial,8,ib}{frame=1,0:Search Term}{font=arial,10,b}
                  	{xmargin=3,3}{ymargin=1,1}{justify=center}{startup=init}
                  	{region}
                  	{lf};
                  	[.50vfind_text!evft_*];
                  	{endregion};
                  	{region}
                  	{lf};
                  	{font=courier,10}[.75,25vChoice^#vLitem_f];
                  	{lf};
                  	{endregion};
                  	{font=arial,8,ib}{frame=1,0:Selection}{font=arial,10,b}
                  	{region3}
                  	{lf};
                  	[.75vChoice!evch_*];
                  	{endregion};
                  	{lf};
                  	<15OK> <15Cancel>
                  	%dlg%
                  	
                  	dlg_code=<<%code%
                  	
                  	IF a_dlg_button = "init" then
                  		a_dlg_button = ""
                  			dim vLitem as C
                  			vLitem=table.external_record_content_get("customer","customer_id+'^^'+alltrim(Lastname)+'^^'+alltrim(firstname)","lastname")
                  			for i=1 to w_count(vLitem,crlf())
                  				dim vname as C
                  				vname=alltrim(word(word(vLitem,i,crlf()),2,"^^"))+", "+alltrim(word(word(vLitem,i,crlf()),3,"^^"))
                  				vLitem_show=vLitem_show+vname+crlf()
                  			next			
                  		vLitem_f=vLitem_show
                  	END IF
                  	
                  	IF left( a_dlg_button, 5 ) = "evft_"
                  	 IF a_dlg_button = "evft_change"
                  	 	vchoice=""
                  	 	if len(vfind_text)<=1						'comment out for first letter action
                  			vLitem_f=vLitem_show					'comment out for first letter action
                  		else										'comment out for first letter action
                  			insearch="*"+alltrim(vFind_text)+"*"
                  			vLitem_f=filter_string_smatch(vLitem_show,insearch,crlf())	 	
                  		end if										'comment out for first letter action
                  	 END IF
                  	 a_dlg_button = ""
                  	END IF
                  	
                  	IF left( a_dlg_button, 5 ) = "evch_"
                  	 	if a_dlg_button = "evch_setfocus"
                  	 		sys_send_keys("{Enter}")
                  	 	end if
                  	  a_dlg_button=""
                  	END IF
                  	
                  %code%
                  	
                  	vresult=ui_dlg_box(dlg_title,dlg_body,dlg_code)
                  	if vresult="cancel"
                  		end
                  	end if
                  	
                  	if vchoice = ""
                  		end
                  	end if
                  	
                  	'get each name part
                  	dim vfm as C
                  	dim vlm as C
                  	vfm=alltrim(word(vchoice,2,", "))
                  	vlm=alltrim(word(vchoice,1,", "))
                  	
                  	'get the customer id from the original list
                  	dim vcid as C
                  	vcid=word(filter_string_smatch(vLitem,"*"+vlm+"^^"+vfm+"*",crlf()),1,"^^")
                  		'msgbox("CUSTOMER id", vcid)
                  	
                  	dim vfilter as C
                  	vfilter="customer_id="+quote(Vcid)
                  	topparent:tables:customer.filter_expression =  vfilter
                  	topparent:tables:customer.order_expression = ""
                  	topparent:tables:customer.query()
                  Mike W
                  __________________________
                  "I rebel in at least small things to express to the world that I have not completely surrendered"

                  Comment


                    #24
                    Re: Xdialog, Xbasic for Data Entry

                    Originally posted by Mike Wilson View Post
                    OK Jetson,
                    Here is one. A progressive lookup for customers. place a button on the AlphaSport customer button with customer_search() as on push event and place this as a UDF named customer_search in the code tab.

                    Code:
                    'dialog field variables
                    ' generate dialog
                    
                    	dim vfind_text as C
                    	dim vLNM as C=""
                    	dim vLitem_show as C=""
                    	dim vLitem_f as C=""
                    		
                    	dim vresult as C
                    	dim dlg_title as C="Search"
                    	dim dlg_body as C
                    	dim dlg_code as C
                    	
                    	dlg_body=<<%dlg%
                    	{background=#180,185,185}{font=arial,8,ib}{frame=1,0:Search Term}{font=arial,10,b}
                    	{xmargin=3,3}{ymargin=1,1}{justify=center}{startup=init}
                    	{region}
                    	{lf};
                    	[.50vfind_text!evft_*];
                    	{endregion};
                    	{region}
                    	{lf};
                    	{font=courier,10}[.75,25vChoice^#vLitem_f];
                    	{lf};
                    	{endregion};
                    	{font=arial,8,ib}{frame=1,0:Selection}{font=arial,10,b}
                    	{region3}
                    	{lf};
                    	[.75vChoice!evch_*];
                    	{endregion};
                    	{lf};
                    	<15OK> <15Cancel>
                    	%dlg%
                    	
                    	dlg_code=<<%code%
                    	
                    	IF a_dlg_button = "init" then
                    		a_dlg_button = ""
                    			dim vLitem as C
                    			vLitem=table.external_record_content_get("customer","customer_id+'^^'+alltrim(Lastname)+'^^'+alltrim(firstname)","lastname")
                    			for i=1 to w_count(vLitem,crlf())
                    				dim vname as C
                    				vname=alltrim(word(word(vLitem,i,crlf()),2,"^^"))+", "+alltrim(word(word(vLitem,i,crlf()),3,"^^"))
                    				vLitem_show=vLitem_show+vname+crlf()
                    			next			
                    		vLitem_f=vLitem_show
                    	END IF
                    	
                    	IF left( a_dlg_button, 5 ) = "evft_"
                    	 IF a_dlg_button = "evft_change"
                    	 	vchoice=""
                    	 	if len(vfind_text)<=1						'comment out for first letter action
                    			vLitem_f=vLitem_show					'comment out for first letter action
                    		else										'comment out for first letter action
                    			insearch="*"+alltrim(vFind_text)+"*"
                    			vLitem_f=filter_string_smatch(vLitem_show,insearch,crlf())	 	
                    		end if										'comment out for first letter action
                    	 END IF
                    	 a_dlg_button = ""
                    	END IF
                    	
                    	IF left( a_dlg_button, 5 ) = "evch_"
                    	 	if a_dlg_button = "evch_setfocus"
                    	 		sys_send_keys("{Enter}")
                    	 	end if
                    	  a_dlg_button=""
                    	END IF
                    	
                    %code%
                    	
                    	vresult=ui_dlg_box(dlg_title,dlg_body,dlg_code)
                    	if vresult="cancel"
                    		end
                    	end if
                    	
                    	if vchoice = ""
                    		end
                    	end if
                    	
                    	'get each name part
                    	dim vfm as C
                    	dim vlm as C
                    	vfm=alltrim(word(vchoice,2,", "))
                    	vlm=alltrim(word(vchoice,1,", "))
                    	
                    	'get the customer id from the original list
                    	dim vcid as C
                    	vcid=word(filter_string_smatch(vLitem,"*"+vlm+"^^"+vfm+"*",crlf()),1,"^^")
                    		'msgbox("CUSTOMER id", vcid)
                    	
                    	dim vfilter as C
                    	vfilter="customer_id="+quote(Vcid)
                    	topparent:tables:customer.filter_expression =  vfilter
                    	topparent:tables:customer.order_expression = ""
                    	topparent:tables:customer.query()
                    Thanks Mike, as Keith says, it would be of no use to me because It is not applicable in what I'm doing,he has a point, but I think it would be a good basis also to see the code of how it is done, I'm wondering why it is not included in the alpha five examples, why is it that they did not make an alpha sports sample database showing the best practices of developers like you, so that users will be immediately guided on what is best or recommended way to develop a good database app, Well, anyway, as a beginner, It caught my attention really quick hoping that code is minimized to produce an app, but an application could really be created but there is a big but, the sample is just a sample, it isn't the best way, it is mainly to demonstrate something in alpha five, I hope future versions will include a sample of the alpha sports showing the best way to produce a real world database application.I hope no one will again mis-interpret this.

                    Comment


                      #25
                      Re: Xdialog, Xbasic for Data Entry

                      Jetson

                      In the world of is the glass half empty/ half full your comment sounds like the glass is half empty.....
                      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


                        #26
                        Re: Xdialog, Xbasic for Data Entry

                        Al, may I forward that observation to my wife? She thinks I make that shit up. (oops)

                        Comment


                          #27
                          Re: Xdialog, Xbasic for Data Entry

                          Originally posted by Ray in Capetown View Post
                          Al, may I forward that observation to my wife? She thinks I make that shit up. (oops)
                          (Yeah you do!)
                          Hacked the code with missing variable before I posted the comment. Nice dialog.

                          CAL, the freebie app in the General Questions uses a saved browse, so I'll give it a bashing and see what I can break. You might be right, and I've been wrong onece before - well probably more than once.
                          Been using saved browses since V9 - which I found to be pretty stable.
                          I believe that my issues with [ESC] stem from the fact that when you change lines in the browse, the one you left has been saved. Therefore you don't do a whole table update a a time - if that makes sense.
                          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


                            #28
                            Re: Xdialog, Xbasic for Data Entry

                            Originally posted by Mike Wilson View Post
                            A house has many openings to the outdoors. There are chimneys, roof vents, windows and doors. Usually there are many windows and certainly it would almost at any instance be most convenient to get to the outdoors through a window. And certainly windows are sometimes demanded to have capabilities for egress. But that's not what a window is for.
                            Nice Zen comment. Can I use it in my lectures on Statistics?
                            Maybe not. The students are flighty enough as it is!
                            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


                              #29
                              Re: Xdialog, Xbasic for Data Entry

                              as Keith says, it would be of no use to me because It is not applicable in what I'm doing,he has a point,
                              Jetson, you missed the point. Mike's sample dialog is good for you to see and learn how to build your own, not to use in your own application. As i said before, you will never learn to walk if you are carried everywhere.

                              Dialog boxes are a very powerful tool to have in a database application, not just for data entry but for a whole load of other things, like the progressive lookup Mike has shown you and just simply giving the user some information about what is happening behind the scenes.
                              Last edited by Keith Hubert; 04-16-2012, 05:10 PM.
                              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


                                #30
                                Re: Xdialog, Xbasic for Data Entry

                                Originally posted by Ray in Capetown View Post
                                Al, may I forward that observation to my wife? She thinks I make that sh.t up. (oops)
                                I think I have a copyright on that, but I can't seem to find it. Must be on another computer...
                                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