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

My 1st Grid Component on the Desktop

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

    #31
    Re: My 1st Grid Component on the Desktop

    From the error message it seems to be tripping over the 'tablename' variable. May be it needs to be changed as well. But if it works on first opening I would have thought that it was ok. Can you post us the whole function?
    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


      #32
      Re: My 1st Grid Component on the Desktop

      Hi Tim,
      Here is the script - but without my table. Hope you can see what I can't!
      Attached Files
      Robin

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

      Comment


        #33
        Re: My 1st Grid Component on the Desktop

        I am having a look. I changed the xml definition to use your previous sample table and am seeing the behavior you described. it is a weird one. Even rerunning the function I get the same result. Hmmmm
        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


          #34
          Re: My 1st Grid Component on the Desktop

          It definitely has something to do with the card statement. I used the rollup code from another function that displays a list view control - no problems there. Since this is actually two dialogs in one (a minor example is in the Learning Xdialog app); it seems like you could make two functions and call one from the other to achieve the desired result.

          At one point, I actually had it calling the browse as modal and the rollup as modeless - which I will do if I can get the rolldown part to work correctly.

          I also tried closing the main modeless xd in the rollup code using different dlg_titles - but that just caused the whole thing to vanish... ;)

          Perhaps it is the scope of the variables that needs changing?
          Last edited by MoGrace; 11-26-2014, 11:31 PM.
          Robin

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

          Comment


            #35
            Re: My 1st Grid Component on the Desktop

            Hi Robin,

            I played around with the scope of the variable without any luck. In the debugger I can see the proper values for the elements of the a5_XdialogDefaultBrowse() function the second time around but that function still seems to fail. Can only make wild guesses on what is going on there. I was thinking something might be being left in memory. The strange thing is that if you repeatedly run xd_Brw_PO() the dialog gets refreshed without a problem. This may be a candidate for a bug report.

            As a work around I a created a solution by running the rollup dialog with its own title and then hiding and showing either one. Code is below.

            First the new rollup title
            Code:
            dim rollup_title as C = "Search Orders rollup"
            then change the main event code to
            Code:
            if a_dlg_button = "close" then 
            	If ui_modeless_dlg_exist(rollup_title)  
            		ui_modeless_dlg_close(rollup_title)
            	end if
            	ui_modeless_dlg_close(dlg_title)
            end if 
            
            if a_dlg_button = "ROLLUP"   
            	if ui_modeless_dlg_exist(rollup_title)
            		ui_dlg_show(rollup_title)
            	else
            		ui_modeless_dlg_box(rollup_title,rollup_body,rollup_code)	  
            	end if
            	ui_dlg_hide(dlg_title)  
            end if
            and the rollup code
            Code:
            if a_dlg_button = "CLOSEB"
               go_rec = ""
               ui_modeless_dlg_close(rollup_title)   
               If ui_modeless_dlg_exist(dlg_title)  
            		ui_modeless_dlg_close(dlg_title)
            	end if
            end if
            
            if a_dlg_button = "ROLLDOWN"
            	If ui_modeless_dlg_exist(dlg_title)  
            		ui_dlg_show(dlg_title)
            	else
            	ui_modeless_dlg_box(dlg_title,dlg_body,dlg_event)   
            	end if 
            	ui_dlg_hide(rollup_title)
            end if
            Also change the position=remember statement in the rollup_body to a unique value.


            Using the show\hide method has the added benefit of returning the user to the dialog in the state that they left it.
            Last edited by Tim Kiebert; 11-27-2014, 12:58 AM.
            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


              #36
              Re: My 1st Grid Component on the Desktop

              Thanks Tim - I'll try it out on Friday.
              Robin

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

              Comment


                #37
                Re: My 1st Grid Component on the Desktop

                Got a chance to try it out today - works great! And both dlgs remember their positions. Thanks Tim. And
                Robin

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

                Comment


                  #38
                  Re: My 1st Grid Component on the Desktop

                  Originally posted by Tim Kiebert View Post
                  I am having a look. I changed the xml definition to use your previous sample table and am seeing the behavior you described. it is a weird one. Even rerunning the function I get the same result. Hmmmm
                  Where would one find the previous sample table in order to study this problem and the resolution?

                  Comment


                    #39
                    Re: My 1st Grid Component on the Desktop

                    Apologies Ray, I must have used one of Robin's examples from another thread. I will make a sample adb and table. But all you need to do is point the browse to any table you have and then adjust the xml definition. I got rid of all but three columns and also removed the filter in the first line.
                    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


                      #40
                      Re: My 1st Grid Component on the Desktop

                      No worries Tim
                      I'll get to the XML code and make adjustments.
                      So the problem is not specific to any particular fields or data content?

                      Comment


                        #41
                        Re: My 1st Grid Component on the Desktop

                        I have been trying out different features in order to find one that would be suitable for a dynamic search whereby i could change the underlying table, and make it work like a dock panel. And since i can't seem to make an actual dock panel, I thought a modeless global toolbar would be the next best thing since it is not form dependent - and you can roll them up.

                        The next leg of this project is to create some files to hold the xml definitions of the various tables I want to use, and let the script call whichever one the user wants to use. Since now I know how to change the size dynamically, displaying different tables seems feasible.

                        Sounds fun doesn't it?
                        Last edited by MoGrace; 11-29-2014, 12:01 PM.
                        Robin

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

                        Comment


                          #42
                          Re: My 1st Grid Component on the Desktop

                          I have this browse working correctly and have a OnRowDblClick event that opens a related form, so I made a template out of it so all I need to do is copy the XML to the new function for a new browse.
                          xdbrwpo.jpg

                          Here is the event that works in the UDF above:

                          Code:
                          XDbrwPO_browse_definition = <<%xml%
                          <browse drop_down_menu="Main Menu" toolbar="My Browse Toolbar" restrict_enter="yes" restrict_change="yes" restrict_delete="yes" gridline_horizontal="yes" gridline_vertical="yes" restrict_split="yes" data_entry_style="default" row_height="17" order="cdate(podate)+dir_id+pono">
                          <code>
                          	<OnRowDblClick>
                          dim go_rec as c
                          go_rec = custpo->ko_no
                          Go_frm("Knit Order","KO_NO",go_rec)
                          </OnRowDblClick>
                          </code>
                          But in my new browse function, this code will not work unless the browse I am working from is open:

                          Code:
                          brw1_browse_definition = <<%xml%
                          <browse width="867" data_entry_style="default" drop_down_menu="Main Menu" toolbar="My Browse Toolbar" restrict_enter="yes" restrict_change="yes" restrict_delete="yes" gridline_horizontal="yes" gridline_vertical="yes" row_height="17" filter="txtype=&quot;R&quot;">
                          <code>
                          	<OnRowDblClick>[COLOR="#FF0000"]<![CDATA[[/COLOR]
                          dim global get_dir_id as c = brw1:dir_id.value
                          dim global get_refno as c = brw1:txref.value
                          dim global get_yarnid as c = brw1:yarnid.value
                          dim choice as c = ""
                          dim lst as c
                          lst = <<%a%
                          Search All Transactions
                          Dir Set Up
                          Yarn Receipt
                          Yarn Tx
                          Yarn Item
                          %a%
                          choice = ui_get_list2("Action: View Form","Yarn Receipt",lst) 
                          select	
                          	case choice = ""
                          		'user cancelled
                          		goto ENDIT
                          	case choice = "Search All Transactions"
                          		vw_frm_1st("Yarn Trans")
                          	case choice = "Dir Set Up"
                          		Go_frm("Dir Set Up","DIR_ID",get_dir_id)
                          	case choice = "Yarn Tx"
                          		Go_frm("Yarn Tx Zoom","TXREF",get_refno)
                          	case choice = "Yarn Receipt"
                          		Go_frm("Yarn Rec","YR_NO",get_refno)
                          	case choice = "Yarn Item"	
                          		Go_frm("Yarn Item","YARN_ID",get_yarnid)
                          end select
                          ENDIT: 
                          end[COLOR="#FF0000"]]]>[/COLOR]
                          </OnRowDblClick>
                          </code>
                          Notice the section I highlighted? Why is that needed for this code and not for the first? And what is it doing? I tried removing it but that messed up the browse format. I should mention that I also removed all the status_area code from both scripts and that seems to work alright in both functions.
                          Robin

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

                          Comment


                            #43
                            Re: My 1st Grid Component on the Desktop

                            This place must be magic - I have been working on this for 2 days and now it is clear that my variable definitions are wrong for this context - here is what they need to be:

                            dim global get_dir_id as c = YarnTx->dir_id
                            dim global get_refno as c = YarnTx->txref
                            dim global get_yarnid as c = YarnTx->yarnid

                            I am working with a set, but that is not the problem, rather it was the syntax. Which is why when the temporary browse was open the global variables were set and the script worked, but not when the browse was closed because the XD needed a table pointer not an object pointer.

                            Sometimes I think I have forgotten more than I have learned!

                            I would still like to know what the CDATA business is about...
                            Robin

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

                            Comment


                              #44
                              Re: My 1st Grid Component on the Desktop

                              I would like my function to dynamically filter the underlying table for the browse before it displays but am having trouble passing a filter to the xml browse definition. Has anyone tried this and had success?

                              In a test browse I added a filter using a global variable and in the xml it rendered it as:

                              filter="TxType=var-&gt;txt_str"

                              and that worked when the value of txt_str was "R", but I would like the entire string to contain the filter but can't figure out how to format it so

                              filter=var->txt_str where txt_str = "TxType = 'R' "

                              If the table could be queried before the browse is displayed I'm thinking that might be a good way to do it too.
                              Robin

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

                              Comment


                                #45
                                Re: My 1st Grid Component on the Desktop

                                Originally posted by MoGrace View Post
                                I would like my function to dynamically filter the underlying table for the browse before it displays but am having trouble passing a filter to the xml browse definition. Has anyone tried this and had success?

                                In a test browse I added a filter using a global variable and in the xml it rendered it as:

                                filter="TxType=var->txt_str"

                                and that worked when the value of txt_str was "R", but I would like the entire string to contain the filter but can't figure out how to format it so

                                filter=var->txt_str where txt_str = "TxType = 'R' "

                                If the table could be queried before the browse is displayed I'm thinking that might be a good way to do it too.
                                ..use ...
                                Code:
                                filter="*remembered()"
                                Last edited by Ray in Capetown; 05-05-2015, 05:05 PM.

                                Comment

                                Working...
                                X