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

Lookups

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

    Lookups

    I would be grateful for some advice please.

    I have a single field in a grid on an a5w page. This field has a lookup. The lookup is to another grid. The lookup is fired by clicking on a link next to the field. However, I would like the lookup to be fired on arrival at the page. How can I do this please?

    #2
    Re: Lookups

    Something like this can work:
    Code:
    ele = $('{grid.componentName}.ACTIONBUTTON.MENU.G0');
    ele.click();
    You'll need to use firebug to find out the name of the link.

    Comment


      #3
      Re: Lookups

      Thanks for the help Lee, but I've now realized the error in my question: I was getting into a loop, i.e. I should have asked for the lookup to be fired on arrival 'if the field was blank'. I have decided to return to this issue later, as it is relatively 'cosmetic'. Meantime, I have arrived at my next problem...

      I now have a number of pages in my online store and am currently working on the actual cart page. In the example below, the items are there via a filter on the session variable 'Cart_Var' (which will be hidden when I'm finished). Then there is a cart 'Total' which I have produced by simply ticking the 'Total' box in Summary Values in the Field Properties. My query is: how do I copy this 'Total' value to one of my fields, in order that I can save that value?
      Cart.png

      Comment


        #4
        Re: Lookups

        Copy the total to one of what fields?

        All I see in the picture is a grid. I don't see anywhere to copy the total TOO.

        The easiest way to get that total at any time is to query the database for it:

        ie: Select sum(amount) from mykart where username = Cart_Var

        If your cart was a List instead of a Grid there are list methods that you could use to get the total directly from the list.

        Using firebug, you could technically determine the value of the summation by finding the actual name of the control in the grid summary - but I'm not sure how that would work if there were too many items in the cart and the total was on page 2, for instance.

        Comment


          #5
          Re: Lookups

          Thanks very much for the info Larry. I wasn't clear with my question. My grid already has a a calculated field total, which I wanted to save, not necessarily on the grid, but a field in the relevant table.

          I'm new to the UX component and hadn't even seen the List option. I will try and substitute my grid wit alist and see where I get to. Many thanks

          Comment


            #6
            Re: Lookups

            Depending on how your application is setup, you may not need to store the total anywhere.

            You can always recalculate it from the data.

            However, if you are determined to store the data, just calculate it on the fly when you store it.

            That's going to be easier than trying to grab it from anywhere on the screen and you will have to make an ajax callback to store the data anyway.

            (Again, depending on how the rest of your app is setup.)

            You will find the list control to be very flexible, though more complicated to learn than a grid.

            The list will be far more mobile friendly if that is at all important to you.

            Comment


              #7
              Re: Lookups

              Thanks for the further advice. I am currently working my way through the videos and building a List as I go. Hopefully I will get there... You are of course correct about my calculating the total from the stored data; I was over-complicating things.

              Thanks again.

              Comment


                #8
                Re: Lookups

                Hi,

                My cart is progressing... In my UX component I have a character field (Text box) which is populated by a lookup. The lookup is to a grid component which then also populates another 3 fields. In the lookup definition the Link type is an Icon. How can I give this icon a Show/hide expression? (I only want it to appear when another field is dirty).

                Comment


                  #9
                  Re: Lookups

                  I can't really tell without a picture but you could put a container around it.

                  Comment


                    #10
                    Re: Lookups

                    I don't think you can give an icon inside of a lookup a show/hide expression.

                    But you could disable the entire control unless the field is dirty. Then it won't matter that the icon is showing because they won't be able to click on it.

                    OR:

                    You could have two controls - one with and one without the lookup. Toggle between showing them based on the dirty value.

                    Comment


                      #11
                      Re: Lookups

                      Thanks for the guidance. I like your second idea Larry. But as ever, I didn't give you enough information. Somehow I managed to stray away from the 'List' option and simply used Text box controls. As I wanted to have up to 4 rows of purchases in my cart, I simply hid the last three rows. Then as each row became dirty, the next row appeared. This meant I was already using one show/hide expression already. The net result is, your idea works perfectly on my first row, but then I can't hide the lookup icon from my second row onwards. (The images below show it more clearly).

                      I tried putting and/or statements in my show/hide expression but it didn't accept my syntax. Am I able to have more than one show/hide expression per control? Or is there another way...

                      Many thanks
                      1.png2.png3.png4.png

                      Comment


                        #12
                        Re: Lookups

                        So you have 4 text box controls the bottom three of which have a show/hide expression in them already.

                        Please show us the show/hide expression you have now and then also show the one you tried to use (with the and) that wouldn't not work.

                        Also, let us know which show/hide expression you are using. There are two - one server side and one client side. (You should likely be using the client side expression.)

                        Comment


                          #13
                          Re: Lookups

                          I am using the client side expression, with examples like this: HeadlineA="" where HeadlineA is the name of a text box control.

                          I don't remember exactly what the and/or's were, but they would have been something like this: Headline2<>"".OR.HeadlineA=""

                          On a separate issue, I now cannot amend my UX component at all; on exit, it keeps asking me if I want to save changes, but won't save them. I'm having to restart Alpha. I guess I've written a conflict in my show/hides?? Especially as I can still amend other components. I shall try deleting my last changes until it works again...

                          Comment


                            #14
                            Re: Lookups

                            If you are using client side show/hides, the correct syntax is

                            this and that

                            not

                            this .and. that

                            .and. is for xbasic code only.

                            Comment


                              #15
                              Re: Lookups

                              Many thanks. I'll try again

                              Comment

                              Working...
                              X