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

Lookup from a label

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

    Lookup from a label

    I have some information that has been normalized in a customers table I am working on. So, for example, City has the value of 1 instead of Washington. Now, for dropdown boxes Alpha works great, giving me the option to show the city name which is pulled from a city table, instead of the foreign key stored in the customers table.

    So now my problem is I want to do the same in a Label instead of a dropdown. The value of the column is 1, and that's what shows up, but there is now way for me to grab the actual city name from another table. (and yes, the label is read-only)

    #2
    Re: Lookup from a label

    btw, i'm using a grid

    Comment


      #3
      Re: Lookup from a label

      Change the grid to be based on a view. Link the tables together in the view.
      Al Buchholz
      Bookwood Systems, LTD
      Weekly QReportBuilder Webinars Thursday 1 pm CST

      Occam's Razor - KISS
      Normalize till it hurts - De-normalize till it works.
      Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
      When we triage a problem it is much easier to read sample systems than to read a mind.
      "Make it as simple as possible, but not simpler."
      Albert Einstein

      http://www.iadn.com/images/media/iadn_member.png

      Comment


        #4
        Re: Lookup from a label

        ugh.. there's no easier way to do that? (besides using a join).

        i saw one of the options was 'custom'. is there anyway to get the information via xbasic? or would that be too slow?

        Comment


          #5
          Re: Lookup from a label

          Originally posted by Sparticuz View Post
          ugh.. there's no easier way to do that? (besides using a join).
          Try it before you judge it.
          Al Buchholz
          Bookwood Systems, LTD
          Weekly QReportBuilder Webinars Thursday 1 pm CST

          Occam's Razor - KISS
          Normalize till it hurts - De-normalize till it works.
          Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
          When we triage a problem it is much easier to read sample systems than to read a mind.
          "Make it as simple as possible, but not simpler."
          Albert Einstein

          http://www.iadn.com/images/media/iadn_member.png

          Comment


            #6
            Re: Lookup from a label

            the problem is that i have like 10 fk's in this table so the view would be pretty complex

            Comment


              #7
              Re: Lookup from a label

              Originally posted by Sparticuz View Post
              the problem is that i have like 10 fk's in this table so the view would be pretty complex
              Why do you need all of the foreign keys defined, when you will only be using one?
              Al Buchholz
              Bookwood Systems, LTD
              Weekly QReportBuilder Webinars Thursday 1 pm CST

              Occam's Razor - KISS
              Normalize till it hurts - De-normalize till it works.
              Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
              When we triage a problem it is much easier to read sample systems than to read a mind.
              "Make it as simple as possible, but not simpler."
              Albert Einstein

              http://www.iadn.com/images/media/iadn_member.png

              Comment


                #8
                Re: Lookup from a label

                i am using all of them in my grid, i only said i was using one for simplicity on the forum.

                I have a city key that links to a city table with the name along with tax information. A Prospect Type key that links to a prospect table for the different types of prospects, a sales rep key that uses a ulink to link to the employee table. (i use ulink to link back to the security system as well). And a few other keys.

                EDIT: this would be my view, but it doesn't work...
                Code:
                SELECT 
                	TelemarketingProspects.ProspectID, TelemarketingProspects.ProspectName, 
                	TelemarketingProspects.Building_AddressLine1, TelemarketingProspects.Building_AddressLine2, 
                	Cities.CityName, TelemarketingProspects.Building_AddressState, 
                	TelemarketingProspects.Building_AddressZip, Counties.CountyName, 
                	TelemarketingProspects.Contact_Salutation, TelemarketingProspects.Contact_FirstName, 
                	TelemarketingProspects.Contact_LastName, TelemarketingProspects.Contact_Phone, 
                	TelemarketingProspects.Contact_Extension, TelemarketingProspects.Contact_Fax, 
                	TelemarketingProspects.Contact_Email, TelemarketingProspects.Contact_AddressLine1, 
                	TelemarketingProspects.Contact_AddressLine2, TelemarketingProspects.Contact_AddressCity, 
                	TelemarketingProspects.Contact_AddressState, TelemarketingProspects.Contact_AddressZip, 
                	ProspectTypes.ProspectTypeName, SICCodes.SICCodeName, Employee.FirstName, Employee.LastName, 
                	EmployeeSizes.EmployeeSizeName, TelemarketingProspects.BuildingSize, 
                	TelemarketingProspects.CurrentPrice, TelemarketingProspects.BidDate, 
                	TelemarketingProspects.LastCalled, TelemarketingProspects.LastTalked, 
                	TelemarketingProspects.NextCall, TelemarketingProspects.NextCallNote, 
                	TelemarketingProspects.Proposal_fk, TelemarketingProspects.PrintStatus, 
                	TelemarketingProspects.DateEntered, TelemarketingProspects.ModifiedDate 
                FROM (Telemarketing.TelemarketingProspects
                	 INNER JOIN General.Cities
                		 ON  Cities.CityID = TelemarketingProspects.Building_AddressCity_fk 
                	 INNER JOIN General.Counties
                		 ON  Counties.CountyID = TelemarketingProspects.Building_AddressCounty_fk 
                	 INNER JOIN Telemarketing.ProspectTypes
                		 ON  ProspectTypes.ProspectTypeID = TelemarketingProspects.ProspectType_fk 
                	 INNER JOIN (Telemarketing.SalesReps
                		 INNER JOIN General.Employee
                			 ON  Employee.ulink = SalesReps.Employee_fk )
                		 ON  SalesReps.SalesRepID = TelemarketingProspects.SalesRep_fk 
                	 INNER JOIN Telemarketing.SICCodes
                		 ON  SICCodes.SICCodeID = TelemarketingProspects.SICCode_fk 
                	 INNER JOIN Telemarketing.EmployeeSizes
                		 ON  EmployeeSizes.EmployeeSizeID = TelemarketingProspects.EmployeeSize_fk )
                Last edited by Sparticuz; 04-20-2010, 03:02 PM.

                Comment


                  #9
                  Re: Lookup from a label

                  Originally posted by Sparticuz View Post
                  EDIT: this would be my view, but it doesn't work...
                  The view doesn't work in Alpha, or the view doesn't work in the database?

                  Shouldn't you make a view in the database and then have Alpha use the view?
                  Al Buchholz
                  Bookwood Systems, LTD
                  Weekly QReportBuilder Webinars Thursday 1 pm CST

                  Occam's Razor - KISS
                  Normalize till it hurts - De-normalize till it works.
                  Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                  When we triage a problem it is much easier to read sample systems than to read a mind.
                  "Make it as simple as possible, but not simpler."
                  Albert Einstein

                  http://www.iadn.com/images/media/iadn_member.png

                  Comment


                    #10
                    Re: Lookup from a label

                    i created the code in alpha using the sql genie, then copied the code to sql management, but it isn't pulling any records...

                    actually now that i think about it, it may be that the record doesn't have all the keys necessary in the sql alpha wrote...

                    testing...

                    yep, that was my problem. i was missing one of the fk's.

                    now, if i want to update one of the fields in the view, does alpha or sql server take care of using the key instead of the name?

                    Comment


                      #11
                      Re: Lookup from a label

                      Originally posted by Sparticuz View Post
                      now, if i want to update one of the fields in the view, does alpha or sql server take care of using the key instead of the name?
                      I don't know. I'm on a strict limit of one question, one answer a day... ;)
                      Doctor's orders...
                      Al Buchholz
                      Bookwood Systems, LTD
                      Weekly QReportBuilder Webinars Thursday 1 pm CST

                      Occam's Razor - KISS
                      Normalize till it hurts - De-normalize till it works.
                      Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                      When we triage a problem it is much easier to read sample systems than to read a mind.
                      "Make it as simple as possible, but not simpler."
                      Albert Einstein

                      http://www.iadn.com/images/media/iadn_member.png

                      Comment


                        #12
                        Re: Lookup from a label

                        If Alpha knows the SQL, it will try to update the correct field. If this is an updatable view, then SQL Server is responsible for updating the right field.

                        The Ajax methods for auto-completes and edit-dropdowns have second argument parameters, so you can pick the related text field and update the FK at the same time.

                        Note that a label is not updatable. You'll need a text field.

                        Comment

                        Working...
                        X