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

Conditional Lookup

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

    Conditional Lookup

    Guys: Sharing here.....

    In an attempt to 'A5' an 'A4' application I believe I've made a discovery. We're sidestepping the absence of set-level field rules in A5 which were available in A4.

    A POS -- Set with a header and invoice items no at all unlike the A5 sample invoicing set. The header, however, contains a customer buying level #'s 1-10.

    The lookup table has inventory items with 10 levels of pricing and depending upon the customer buying level and will drop the correct price for that level into the invoice items line. That line-item table also has a field to accept that buy-level from 1-10, called PLEVEL.

    Here's what I did with the form. On the 'On Arrive' event of the browse for items, I set a global variable to the value of the buying level in the header.

    The field rules for the browse's 'plevel' field is 'calculated' based on the value of that global variable, "plev". Understand, that while using the out-of-the-box lookup choices, the variable was NOT listed anywere in the drag fields boxes.

    All of this works quite well but I have anxieties about its stability. Anyone see anything potentially crippling here?

    TIA

    Ken


    #2
    RE: Conditional Lookup

    Also.....

    The lookup displays all 10 prices. I was able in A4 to display only the applicable one i.e. customer buy level 5 would show only price #5. Anyone know a trick to make this happen in A5? -- that is without 27 lines of Xbasic?

    Thanks again,

    Ken

    Comment


      #3
      RE: Conditional Lookup

      Ken,

      You can set the filter for your lookup to limit the items to the price level you want. First, set a variable to the level you want to display before the lookup pops up. For example, use a table or global variable called "level" . If your lookup table has a field for "priceLevel", set the lookup filter to "PriceLevel = var->level".

      Jerry

      Comment


        #4
        RE: Conditional Lookup

        Thinking in the abstract here, so you know I am high as a kite...

        1. How do you arrive at 10 discrete levels of buy and sell? What is the difference that makes it jump from 1 to 2? Volume? Delivery distance? The infamous fudge factor?
        2. What is wrong with a simple discount or warranty number? You can then have infinite varieties of pricing using only ONE field. A customer can have their own discount rates...
        3. When I invoice I like to reference the buy cost directly, in the same record as the sell. I have a sell price and a buy cost. The cost is my actual cost that I paid for the actual goods sent, whether it is labor (= gross), material, equipment, or a subcontract. I can then put any markup I like on my sell price. In reality every cost incurred is at ONE price, and every sale you make is at ONE price. They might slide up and down depending on various factors, but when the deal goes down there they are.
        4. Your way you have discrete fixed levels. My way they might be one price on one order, and 5 minutes later be another price on a seperate order simply because it is a different volume or whatever makes the rate change.

        Plus my way is simpler to code, but hey, ...

        Comment


          #5
          RE: Conditional Lookup

          Goal: Pleases the client no end! ! ! !

          Client: This guy sells on bids. No percentage discounts no fixed price levels - the price is the BID price for THAT customer. He's happy, for instance, to edit the price level 5 on 25 items he won on a bid for customer number 5. He has 10400 things so sell. Needs only to edit once per year per customer.

          To Jerry: I tried your suggestion, but since the actual inventory must have 10 price level fields, this won't work -would seem that we need a filter on the table-field side of the utilitiy. You see the inventory record holds all 10 prices.

          To Stephen: Great theory and I agree and initially pushed it, but the client is paying the bill - you know.....

          It's nice to see the price for THAT customer on the pick list but I guess, the poor guy will have to see them all. The routine does drop the right price for the buy-level # however.

          Thanks as alway to you both.

          Ken

          Comment


            #6
            RE: Conditional Lookup

            Ken

            There is a way to get what you want. Use a conditional table lookup and use the same table for each condition. Condition 1 being var->level = 1, condition 2 being var->level=2, etc. For each conditional lookup use a differnt display list. For level 1 show and fill from level 1 pricing only, for level 2 pricing show and fill from level 2 pricing etc. This will take 10 conditions, but it should work.

            Jerry

            Comment


              #7
              RE: Conditional Lookup

              Haven't finished yet.

              You COULD create an array and use UI_get_list. When you create the array you put in whatever you need.
              Title "Level 5"
              "Gizmos 15.00"
              "whatzits 12.50"
              "Whiligigs 10.00"

              Can you use Conditional table lookups, the condition is the price level?

              Comment


                #8
                RE: Conditional Lookup

                Jerry:

                We're going back and forth - almost a live chat. I've done what you say, I think. and it works.

                See the screen shots.

                Ken

                shot 2 to follow

                Comment


                  #9
                  RE: Conditional Lookup

                  Man....

                  Ui array and conditional lookup GEEZ you guys a flyin' ideas at me so fast I'll have to stop and play some more.

                  Thank you - thank you --thank you!

                  WHAT A THINK TANK WE HAVE HERE!

                  Ken

                  Comment


                    #10
                    RE: Conditional Lookup

                    Ken,

                    "almost a live chat" Shows how many of us are really working at work. Anyway, I have attached a small app that shows what I am talking about and it does work.

                    Jerry

                    Comment


                      #11
                      RE: Conditional Lookup

                      Brightbill,

                      YOU FOX!

                      Precisely what I wanted. It IS like A4 - just looks different.

                      I guess I get the big "DUH" award. Thanks for taking the time and sample ------ GEEZ if I was a woman I'd be blonde!

                      Thanks again Jerry.

                      When I think of the hours I spent on things like this in A4 with ZERO help from anyone, I just revel at this board and all of you guys and your unselfish support.

                      Many Thanks


                      Ken

                      Comment


                        #12
                        RE: Conditional Lookup

                        DUH Again:

                        Jerry I can't make your idea work in my environment. Care to take a look.


                        Thanks

                        Ken

                        Comment


                          #13
                          RE: Conditional Lookup

                          If I may. It appears that you have not completed the lookup fill information in field rules. The lookup fields are empty in most of your choices and need to be keyed to the lookup level of the conditional lookup table.

                          IE: If plevel=5 then the lookup price must be for level 5.

                          Look at Jerry's example again and you will see what I am saying.


                          Thanks

                          Rodney

                          Comment


                            #14
                            RE: Conditional Lookup

                            Rod:

                            Thanks. I've done the da__ed thing everyway from sunday and have discovered something else....

                            Changes made and saved may or may not be 'saved'. For instance, I've done a number of setups here and out of the blue, one that I thought had been completely overwritten several attempts before - came up! I did a compact, reselected the lookup to 'None' saved it; compacted again and closed/opened alpha. Wierd!

                            I'm not surprised that things [mappings] are missing in view of all of this other stuff.

                            Don't spend any more of your time on this. I'll have to go back to the books or whatever.

                            Thanks again.

                            Ken

                            P.S. I was SOOOOOOOOO easy in A4.

                            Comment


                              #15
                              RE: Conditional Lookup

                              Rodney, Jerry, Stan --- et al.

                              Resolved: I didn't understand that EACH db in the upper window of the conditional lookup utility needed to be mapped individually. Geez, I compared Jerry's example time and time again and couldn't understand why mine wouldn't work. Never scrolled thru those db entries in the upper window.

                              Like everything else in this learning curve with everyone's guidance, I have again 'stumbled' to a conclusion. Still can't find any manual documentation for any of this.

                              Thanks to all.

                              Ken

                              Comment

                              Working...
                              X