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

Display lookup value

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

    Display lookup value

    Hi, a number of fields in my tables contain integer values. These values come from other lookup tables where there is an ID and Description field (eg 1:Cat 2:Dog 3:Horse etc). In other words I am storing the ID and not the description.

    How do I get my grid to display the Description rather than the ID in a label field? I suppose I could base my grid on a view instead of the table directly but being new to A5 I thought I would ask in case there is an eaiser way of doing this in A5.

    Thank you.

    #2
    Re: Display lookup value

    What would be the result of a calculated field which was the lookup to the table where the descriptions are?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


      #3
      Re: Display lookup value

      Richard,

      I'm an Access "convert in progress" and struggled a bit with the lookups as well. If you check out this post http://msgboard.alphasoftware.com/al...l=1#post603944 I have a video of how the lookups are created using Field Rules on the tables themselves. I show two cases. One where I do not display the key (integer) and others where I show the key as well as another value.
      BobT55
      Alpha Five Version 10.5 Build 4369 / Addins Build: 3712
      Active Link Tables via SQL Server 2008 R2 (on laptop)
      Win 7 Home Premium SP 1 - 64-bit
      Dell Inspiron 15 (N5110) i5 2410M 8 GB Ram

      Comment


        #4
        Re: Display lookup value

        Hi, I'm still struggling with this, A5 makes so many things easy... there must be a simple way to have my grid display a lookup value (as described in my original post) when the field is set to label type?

        In hope, Richard.

        Comment


          #5
          Re: Display lookup value

          Hello

          this is not that difficult if i understand correctly.
          -- you want to display the description but store the id in the web form
          if this assumption is correct. here is how to do it.
          table "a" the one you are working on has a field that is "pet_id" and is numeric.
          table "b" has the values you want such as pet_id as numeric, type as character.
          now go to table "a" and create a grid and include all the fields you want and the "pet_id" field"
          now click on the "pet_id: field and on the right side change it to drop-down type
          and click on the choices make it dynamic.
          (i am using mysql - so it will be alphadao and my connection string) in the selection of the database and tables.
          select what ever database you are using
          then select the table "b"
          then select the field to display then check the box to store another field, when the field designation pops up select the "pet_id" field that is numeric.
          click "ok" as much as needed to get back.
          so when you run the grid it will show the description but store the id field.
          try.
          (as far as i know can not be down on label, but drop-down, yes!)
          if i was wrong in my assumption, my apologies.
          thanks for reading.

          gandhi
          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


            #6
            Re: Display lookup value

            Richard,
            If you checked out the link in my post above you would see a test database I put together to demonstrate the issue I was having with lookups and active-link tables. It uses an Access .accdb for the data.

            I've modifed that database to include two forms that demonstrate how the lookups, as configured in the 'locations' table, appear automatically in them. The first is a form based on locations where I told it to use the 'default form' (it is named "locationdefaultform" in the database) and the second I started with a blank form based on the locations table and added a browse control to it, also based on the locations table, including all the fields (named "locationformwithbrowse"). This is a pretty simple and clear demo on how this works.

            If you unzip it to your PC it should create a "C:\AlphaFiveTests\LookupsIssue" folder. Open the "LookupsIssue.adb" file from that folder in Alpha Five. If you look at the field rules for the locations table you can see how the lookups are defined for five of the fields. If you open either of the forms you'll see how the lookups work as I've configured them in the field rules (I edited NOTHING on the forms themselves).

            I hope this helps!
            - Bob
            Attached Files
            BobT55
            Alpha Five Version 10.5 Build 4369 / Addins Build: 3712
            Active Link Tables via SQL Server 2008 R2 (on laptop)
            Win 7 Home Premium SP 1 - 64-bit
            Dell Inspiron 15 (N5110) i5 2410M 8 GB Ram

            Comment


              #7
              Re: Display lookup value

              If you are using SQL:

              In the QUERY (AlphaDAO) section you can choose "SQL Select Statement" instead of using "Table or View"

              Then click the "Edit SQL in Query Builder"

              You can then add multiple tables and linking fields...The Alpha way... :)

              They should all appear in your Fields section now. Label away!
              Thanks,

              Roderick Silva
              [email protected]

              About Me: rodericksilva.com
              Twitter: rodericksilva

              Comment

              Working...
              X