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

how do I code lookups properly?

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

    how do I code lookups properly?

    Sounds a daft question, but it is one I have never been able to solve.

    The Majority of my tables have lookups defined in one way or another using a unique identity field which I use in to get values from the lookup table with no problem. The only way I have found to get it to work is by defining the lookup field rules on the unique field itself and then add calculated fields to display the correct value in my Browses and Forms. Is there a way of setting up table lookups that will make the relevant unique fields invisible in the lookup process?
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

    #2
    Re: how do I code lookups properly?

    Hi Graham,
    Attached is a jpg, this is a basic lookup in field rules.

    Items available from suppliers are kept in a table called comparisonsheet1.

    We use a standard set as the purchase order which is purchase header ==> purchase items.

    In the purchase items table there is a lookup which is linked to the comparisonsheet1 table item_no field. The lookup source is comparisonsheet1->item_no which fills in but doesn't show the product_id field in the pruchase items table. the next source is the comparisonsheet1->name field which shows but doesn't fill in, therefore all the end client see is the name of the product not the item no. There is also a fill but dont show for the full description field in the purchase items table.

    Hope I have made this clear and it helps.

    Comment


      #3
      Re: how do I code lookups properly?

      Sorry Lance,

      cannot read the info on the JPG, image too small and when I zoom in it quickly becomes pixelated and unreadable.

      dis regard, I can read it.

      that seems to be the same as I have coded at the moment. see attached screen captures.

      I'm still not sure how I can do these lookups on the op_unique and b_unique fields without actually displaying them on the underlying form?

      example 1 for op_unique field and example 2 for b_unique field
      Last edited by Graham Wickens; 03-30-2007, 10:56 AM. Reason: clarity
      --
      Support your local Search and Rescue Unit, Get Lost!

      www.westrowops.co.uk

      Comment


        #4
        Re: how do I code lookups properly?

        Graham,

        Presumably the field below each of the op_unique and b_unique lookup fields are the calculated fields you mention in your first post?

        Is your logging master form based on a set?

        If so can you send all tables from that set plus appendix_c.dbf and base_details.dbf and I will construct what you want.

        Comment


          #5
          Re: how do I code lookups properly?

          Ok, it took a while but I think I have everything in the attached zip file.
          --
          Support your local Search and Rescue Unit, Get Lost!

          www.westrowops.co.uk

          Comment


            #6
            Re: how do I code lookups properly?

            Graham, are you talking about table lookups defined in field rules? or, possibly, something else? Does your example database include instructions for us to follow to find the relevant form / script / lookup ? what version of Alpha Five is being used?

            Later...
            Well, I've answered one of my questions. You've given us no crumbs to follow to get to grandmother's house. Too bad.

            -- tom
            Last edited by Tom Cone Jr; 03-30-2007, 07:10 PM.

            Comment


              #7
              Re: how do I code lookups properly?

              Certainly am, is there another way then that I am unaware of? maybe that is my problem.

              In the example there is a form "Logging_Master" where I have highlighted the unique fields and the corresponding calculated values.
              --
              Support your local Search and Rescue Unit, Get Lost!

              www.westrowops.co.uk

              Comment


                #8
                Re: how do I code lookups properly?

                I'm sorry. I don't understand the question. Would like to help, but will need a single specific explanation of your goal, explaining in detail how you've attempted it thus far, using actual table, form, and field names. Maybe others more intuitive than me can help, but I need you to hit me over the head with specifics.

                -- tom

                Comment


                  #9
                  Re: how do I code lookups properly?

                  Graham,

                  Is this what you are after?

                  All I did was swap the lookup to a drop down box

                  Comment


                    #10
                    Re: how do I code lookups properly?

                    Graham, if your data entry folks can find the operator based on its name, and not its op_unique field value, why not use a "coded lookup"? This would cause the operator name to display instead of the op_unique field value. Search help for "Coded Lookup" for more details.

                    -- tom

                    Comment


                      #11
                      Re: how do I code lookups properly?

                      OK, I think I've got it now!!

                      I changed my field lookups to "Display as Drop Down List" and that appears to be what I want, the Unique field value has disappeared and I get the BASE_NAME displayed instead of the unique value.
                      --
                      Support your local Search and Rescue Unit, Get Lost!

                      www.westrowops.co.uk

                      Comment


                        #12
                        Re: how do I code lookups properly?

                        Graham, I'm glad you have it sorted. Sorry to have been so obtuse.

                        -- t

                        Comment


                          #13
                          Re: how do I code lookups properly?

                          I have hit one small problem, If I want to delete a value from the lookup field ie the underlying Unique value used in the lookup, the system wont let me, it just puts the value back in the field when I try to save it or tab to another field. So how do I now delete the value if and when required?
                          --
                          Support your local Search and Rescue Unit, Get Lost!

                          www.westrowops.co.uk

                          Comment


                            #14
                            Re: how do I code lookups properly?

                            Please post a current copy of the database, with instructions for us to follow to find and see the problem. -- tom

                            Comment


                              #15
                              Re: how do I code lookups properly?

                              Attached is the updated example database zip file.

                              1) Open "Master File" Browse

                              2) Try and delete value "Heathrow International" in the "Aircraft Operator" field where REG = "G-EUUO" or try and delete duff entry "B0005112" for "aircraft Operator" where REG = "G-DOCL". They wont delete!!
                              --
                              Support your local Search and Rescue Unit, Get Lost!

                              www.westrowops.co.uk

                              Comment

                              Working...
                              X