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

Open an UX to add/edit row in viewbox

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

    Open an UX to add/edit row in viewbox

    Hi
    I have a huge list control with detail view, that takes over 15 seconds to load (i.e not usable).
    So i successfully implemented a viewbox with the same html layout as the list ( loads now in less than a second :-) ) and for the detail view part i built a data bound ux.
    All that's left now is how to glue the two parts, mainly getting the current ID in the viewbox and passing it to the ux ( i already have the parameters set in the editing UX but the viewbox always passes 0 in getValue ).

    Thanks
    Jaime

    #2
    Hi Jaime,

    I do this type of thing a lot.

    The way I do it is to have the viewbox in one panel card and to have the 'detail view' in another (invariably a docked panel that is out of view until needed) on the same UX. then at the top of your list in the viewbox you need a div like this
    Code:
    <div class="[theme:listBox.base.item.className|{dialog.style}ListItem]" a5-item="_AARow" a5-value="{QSUM_NO}" >
    where {QSUM_NO} is replaced with your tables primary key (NB your viewbox needs to return as a character, not numeric) and don't forget the closing div at the bottom of the list
    Then in the items tab on the viewbox set the _AARow item onClick event to use an action javascript to populate the data in an unbound UX where the method to read the primary key is from controls on the UX and point it to the 'list' and then set the other items under table definition and data binding.

    Then, if your detail view panel card is docked, set the _AAROW item on double click event to set the docked panel active.

    You can then use Update, Insert or Delete data(for use with an unbound component) to send the data back to your database.

    Comment


      #3


      UX and point it to the 'list' and then set the
      Lance - are you saying you are using a List still somewhere, or was it just a figure of speech?
      Insanity: doing the same thing over and over again and expecting different results.
      Albert Einstein, (attributed)
      US (German-born) physicist (1879 - 1955)

      Comment


        #4
        Hi Pete,

        I don't use lists anymore, not done so for a few years now (apart from the newish calendar list). That is why I put 'list' in single quotes as I am referring to Jamies list in his viewbox

        Comment


          #5
          Phew that's a relief - same here, the bad news is for AA is by making all the new data methods and controls being bound to the List control and NOT the UX by saying, and I quote. 'You can still use the Viewbox for accessing Mongo, Firebase etc - you just need to use a List Control as the data source and 'we have been working hard to biring the power of the GRID to the LIST Control, and we a nearly there..' may be the final nail for developers.

          What a shame.

          Just sayin.

          Pete
          Insanity: doing the same thing over and over again and expecting different results.
          Albert Einstein, (attributed)
          US (German-born) physicist (1879 - 1955)

          Comment


            #6
            It would really be helpful if AA would bring the ease of the grid to the list as well.
            One of these days I'll give the viewbox another go, but when it comes to low code
            and functionality, I still think the grid wins.
            Gregg
            https://paiza.io is a great site to test and share sql code

            Comment


              #7
              Originally posted by Lance Gurd View Post
              Hi Jaime,

              I do this type of thing a lot.

              The way I do it is to have the viewbox in one panel card and to have the 'detail view' in another (invariably a docked panel that is out of view until needed) on the same UX. then at the top of your list in the viewbox you need a div like this
              Code:
              <div class="[theme:listBox.base.item.className|{dialog.style}ListItem]" a5-item="_AARow" a5-value="{QSUM_NO}" >
              where {QSUM_NO} is replaced with your tables primary key (NB your viewbox needs to return as a character, not numeric) and don't forget the closing div at the bottom of the list
              Then in the items tab on the viewbox set the _AARow item onClick event to use an action javascript to populate the data in an unbound UX where the method to read the primary key is from controls on the UX and point it to the 'list' and then set the other items under table definition and data binding.

              Then, if your detail view panel card is docked, set the _AAROW item on double click event to set the docked panel active.

              You can then use Update, Insert or Delete data(for use with an unbound component) to send the data back to your database.
              Thanks Lance, that's more or less what i had in mind. I am still confused, in some part you mention "set the other items under table definition and data binding" then later "for use with an unbound component". In my scenario i already have the "detail view" pane in an embedded ux with data bound, and getting the ID in a parameter.
              My missing link is how to set the parameter to the value of the viewbox current id then call the ajax callback that opens the ux ( im using the action "open ux" in a dynamic panel )

              Thanks!
              Jaime

              Comment


                #8
                northwind_customers.a5wcmp

                Hi Jamie and any others interested in this concept of using a viewbox as a list with a detail view. Attached is a very simple UX, which took about 20 mins to put together. It is fully functioning and based on the AADemo-Northwind database. You can add, alter and delete records to the customers table and your copy of that table will be altered.

                The points to look at are the value property of the listrowcontainer in the viewbox layout, the items on-click event and the javascript actions which are connected to the controlbar.
                Attached Files

                Comment


                  #9
                  Well - I hope you both find this helpful, the VB is really the only way to go as far as i'm concerned - yet the most undervalued control in the UX.

                  Watch this detailed video the control is attached as the video states - you may need to change the connectionstring where indicated.

                  UX is attached

                  Cheers - Pete.

                  Also you may want to contact Steve Wood [email protected] at the IADN as I'm doing a deep dive on the Freedom of the Viewbox online October 29th.


                  https://www.screencast.com/t/ANo5HC4Jk60i



                  Attached Files
                  Insanity: doing the same thing over and over again and expecting different results.
                  Albert Einstein, (attributed)
                  US (German-born) physicist (1879 - 1955)

                  Comment


                    #10
                    Originally posted by Lance Gurd View Post
                    northwind_customers.a5wcmp

                    Hi Jamie and any others interested in this concept of using a viewbox as a list with a detail view. Attached is a very simple UX, which took about 20 mins to put together. It is fully functioning and based on the AADemo-Northwind database. You can add, alter and delete records to the customers table and your copy of that table will be altered.

                    The points to look at are the value property of the listrowcontainer in the viewbox layout, the items on-click event and the javascript actions which are connected to the controlbar.
                    Lance, a million thanks for taking the time!!!
                    I didn't know the bunch of actions with UNBOUND data, been looking at something like that for ages! This is really helpful, exactly what i was looking for...

                    Jaime

                    Comment


                      #11
                      Hi Pete,

                      Thanks for the refresher on using {[count]} as the record data pointer, I first started using that when Selwyn first published UXVB_V12--11 Get Data for Current Row in a Viewbox video and used it quite a bit.

                      I then started using nested SQL queries to populate the data in some of my viewboxes and found they got very heavy so I went back to using the primary key method.

                      I will re-visit the {[count]} method as I have a viewbox that has a nested query involving 15 tables which has, at the moment, 6 layouts which are switchable via a controlbar and is all instantaneous once the viewbox is initialially loaded, and does not use any CRUD operations, but I believe with the {[count]} method I could add CRUD quite easily.

                      Jamie do not discount what Pete has shown, it is very powerful. Especially about the state variables, I will try and attend on the 29th

                      Comment


                        #12
                        Cheers. What we are doing here is only the tip of the ice bereg. I also don't use any Javascript Actions - they are loaded with xbasic managing the process, I try not to involve the AA Server where possible, this approach keeps thing running and really ups the number of concurrent users. Also it should go without saying your Viewbox can use SQL Views as the source, as you know the List Control wants to write to the bind to the table directly, whereas, using views you can have SQL to deliver anything from any table and you can then decide what how you want to submit what to where without limitation once in the Viewbox, you can also repurpose Viewboxes dynamically.

                        All good stuff.

                        Pete



                        Insanity: doing the same thing over and over again and expecting different results.
                        Albert Einstein, (attributed)
                        US (German-born) physicist (1879 - 1955)

                        Comment


                          #13
                          Originally posted by Lance Gurd View Post
                          Hi Pete,

                          Thanks for the refresher on using {[count]} as the record data pointer, I first started using that when Selwyn first published UXVB_V12--11 Get Data for Current Row in a Viewbox video and used it quite a bit.

                          I then started using nested SQL queries to populate the data in some of my viewboxes and found they got very heavy so I went back to using the primary key method.

                          I will re-visit the {[count]} method as I have a viewbox that has a nested query involving 15 tables which has, at the moment, 6 layouts which are switchable via a controlbar and is all instantaneous once the viewbox is initialially loaded, and does not use any CRUD operations, but I believe with the {[count]} method I could add CRUD quite easily.

                          Jamie do not discount what Pete has shown, it is very powerful. Especially about the state variables, I will try and attend on the 29th
                          Pete's state variables methods are really powerful and extremely useful been using them since he helped me with them in another scenario...

                          Comment


                            #14
                            I have been wanting for some time to switch from the list control to the viewbox control but it has always been a daunting prospect to me given the sheer amount of depth I have built using lists.
                            However, I seriously want to start working towards this goal for one reason and one reason only ... Performance!

                            Pete has demonstrated this numerous times here and I consider him to be the most knowledgeable Alpha user on this topic, this thread is simply one more example of that.
                            Thanks Pete for your continued valuable contributions to this community, this is another great video!
                            Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                            Comment


                              #15
                              Thanks - the 'No-code-low-code' mantra is a disaster for those who want to build their own applications in AA, who also want to go beyond using AA as a tranascational tool rather than a communication tool. The predefined controls, methods, obscure xbasic guid's, etc in Javascript Actions does nothing but build - bigger and bigger and bigger controls - all the time adding more xbasic etc, the result -slower and slower, more sluggish components - with functions and actions hidden behind buttons and clicks all over the place making it virtually impossible to find where code is, - all that cost - so the product is appealing to people unwilling to learn the fundamentals. I discovered the notion of 'tabula rasa' about 2 years ago, it was either find a new application development tool or find a new way of approaching the one I have, as a result AA has become the new tool.

                              Use the noun tabula rasa to describe the chance to start fresh, like when a student's family moves and she gets to begin the year at a brand new school with a completely blank slate. An opportunity to begin again with no record, history, or preconceived ideas is one kind of tabula rasa.
                              Pete

                              Insanity: doing the same thing over and over again and expecting different results.
                              Albert Einstein, (attributed)
                              US (German-born) physicist (1879 - 1955)

                              Comment

                              Working...
                              X