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

Populate UX from a List

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

  • Populate UX from a List

    I have been going around in circles now for hours trying all different ways of doing this.

    I have a UX component with multiple panels.
    I have a list which contains a button on each row in panel 1. The list is bound to table 1.
    When the button is pressed, I want to activate panel 2 which has an embedded object. This object is a UX dialog bound to table 1.
    I want to populate this UX dialog with partial data from the list.

    I have watched videos etc.. and I can not populate the UX dialog in panel 2. I can activate the panel, but the UX dialog is always empty.

    NOte: I probably should have titled this post as "Populate a UX Dialog from a Button in a List"

    Thank you,

    Ron
    Alpha 5 Version 11
    AA Build 2999, Build 4269, Current Build
    DBF's and MySql
    Desktop, Web on the Desktop and WEB

    Ron Anusiewicz

  • #2
    Re: Populate UX from a List

    Trying to understand this a bit more. Both the List and the embedded UX are bound to the same table... table 1. If this is the case then you're working with exactly the same data with both UX components.

    If this is true, then would you not want to use the Detail View of the List to edit the data in the List?

    Nonetheless, if you're using a column layout in the List, then the button javascript can first use .setValue to fill in values in the embedded child UX... you just need to get a pointer to that child Alias. You set the alias of the embedded UX in the properties of the embedded control. Then you can use code like this...

    Code:
    var cUX = {dialog.Object}.getChildObject('UXCHILD'); //the alias of the embedded UX is UXCHILD
    cUX.setValue('FIRSTNAME','Davey');
    {dialog.object}.panelSetActive('PANELCARD_2');

    Comment


    • #3
      Re: Populate UX from a List

      Thanks Dave,

      If this is true, then would you not want to use the Detail View of the List to edit the data in the List?
      Up until now, I didn't even know I could do that.

      So I did play with the detail view, but I didn't like the way it was presented on the screen. I could probably make it work when I have more time to learn about the detail view.

      I'm setting up this app to run on an iPad.
      Your code example worked just great.

      That said, I think the real problem I was having was that I had a panelcard on the UX dialog I was calling.

      Anyways, I'm a happy camper now. Thanks again,

      Ron
      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


      • #4
        Re: Populate UX from a List

        If it's all the same table... and... you're building a mobile app... then you definitely want to use the List controls Detail View. You can set it up to look any way you like. They're just controls. The Detail View controls can be sitting in another panelcard. When you select a row from the List, you set your "detail view" panelcard active. Because the detail view controls are tied to the List control, they are auto populated with the List data.

        I believe it's exactly what you want to... and should use. You definitely want to spend time on it now.

        Comment


        • #5
          Re: Populate UX from a List

          Thanks Dave,

          I did revisit the detailed view and I did learn a lot more about the detail view. However; I wasn't able to get things working quite right. I'm beginning to suspect that my lack of knowledge about structuring the UX component is the fault. I think my structure resulted in getting server-side code conflicts, but I'm not sure. I think I've got too much going on in this one UX component.
          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


          • #6
            Re: Populate UX from a List

            You can have a lot going on in one UX... depending on what it is. If it's well structured, you can do a lot.

            Your prior structure of using a List and then an embedded UX both tied to the same table is not the way to go.

            For this part of it... do you just want to display a List control and be able to display/edit that data in controls? If do, then it's the List that controls the data flow. You do not have the detail view controls data bound outside the list. The are tied to the list. When data is edit in the detail view controls, those edits are sent to the List and the List handles the SQL update.

            Send me a pm here on the board and we can walk through it.

            Comment


            • #7
              Re: Populate UX from a List

              Hi Dave,

              Spurred on by your persistence, I spent quite a bit more time looking at using the detailed view. This is what I found.

              I'm using a DBF table and it looks like Alpha is not supporting synchronization with DBF tables. Their video shows server side events in the properties of the detailed view page, but server side events are no longer available on my detailed view page. I'm using Build 2999.

              If I had a server side event, I think it would be quite easy to write some xbasic code to update the table. Without server side events in the detailed view, I don't think it is possible.

              I'm not going to be using disconnected apps or anything fancy. This is just a simple app that will have a max of 2000 records. In all likely hood, maybe 10 entries a week. I'm just using the detailed view to edit the entry in case a spelling error is found or something needs to be changed. Once posted, no edits will be allowed.

              I know, I should move over to SQL. The problem is that I am trying to marry a simple little WEB app to a 20 year old desktop app that is vital to the company. If this experiment is successful, I will make a couple of more WEB apps.

              Thanks for the push,

              Ron

              If I can't make this work, then the company will most likely abandon Alpha and purchase industry specific commercially available software.
              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


              • #8
                Re: Populate UX from a List

                DBF is different world... much like a movie I just saw... however, I just created a List Control with Detail View against the AlphaSports Customers DBF table. I can make changes via the Detail View and synchronize. No code required.

                Comment


                • #9
                  Re: Populate UX from a List

                  Originally posted by Davidk View Post
                  DBF is different world... much like a movie I just saw... however, I just created a List Control with Detail View against the AlphaSports Customers DBF table. I can make changes via the Detail View and synchronize. No code required.
                  What version/build of Alpha are you using?
                  What is your connection string?
                  I want to repeat your test.

                  Comment


                  • #10
                    Re: Populate UX from a List

                    I just walked through this with Ron, and the way I'd set mine up is by using an AlphaDAO Connection string. You can set up a List Control manually and are allowed to choose DBF as the data source. Doing this, it seems that edits are not carried through to the table. I've not looked into this yet, but will.

                    But, if you choose a SQL Data source, then you can create an AlphaDAO connection string where your Connection Type is ODBC. Then, in the Data Source Name property, you have an Edit link. The Edit link takes you to the Windows ODBC Data Source Administrator.

                    Select Add
                    Select Microsoft dBase driver, and click Finish
                    Now you're in the ODBC dBase Setup dialog
                    Enter a Data Source Name of your choosing and a Description
                    I left Version at dBase 5.0
                    Uncheck "Use Current Directly" and the click Select Directory and navigate to your DBF files.

                    It looks like the ODBC driver is truncating DBF field names at 10 characters, so you'll have to live with that.

                    Comment


                    • #11
                      Re: Populate UX from a List

                      There is one drawback to using a connection string which may not matter.

                      When you delete a DBF record, the record is not deleted until you pack the table. When using a connection string, you may delete the record. Looking at the DBF table does not show the deleted record. But when loading a grid using a connection string, the deleted record is visible. There is probably a way around this. The simple thing is to not allow deletes using a connection string to access a DBF file.
                      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


                      • #12
                        Re: Populate UX from a List

                        in dbf the delete actually does not delete the record it only marks the flag deleted or may change one character at the beginning of the record.
                        if you connect with odbc that field is not taken into consideration so you see the record.
                        a work around will be to add a field to the dbf table, logical field, deleted, and fill it with yes/no ( default no ) or true/false (default false) then in the grid
                        fashion the grid where that field is "no or false as the case may be" as the query string. then that record will not show.
                        so when you delete the record in dbf side, you not only have to delete but also set this field to correct deleted value. then it will work both areas.

                        better yet, do not delete any record at all. just achieve them by marking this to correct true value and run an operation to move the record to a different table like customer_archive for a customer table. that will give you access to historical data should you still need it and not worry about web side.

                        in real life there should be no deletes just markers to say which are valuable and which are not except for very rare circumstances.
                        Last edited by GGandhi; 10-13-2015, 08:33 AM. Reason: spelling
                        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


                        • #13
                          Re: Populate UX from a List

                          If you're working with a List control and dbf tables must be used then pack the table after a delete and sync. After the sync, run an Ajax Callback which packs the table.

                          Code:
                          function packTable as c (e as p)
                          
                          'debug(1)
                          	
                          dim tbl as P
                              
                          tbl = table.open("e:\program files (x86)\a5v12_3097\samples\alphasports\Customer.Dbf")
                              
                          tbl.pack() 
                          tbl.close() 
                          
                          end function

                          Comment

                          Working...
                          X