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

Help - "cannot create lookup"

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

    Help - "cannot create lookup"

    I recently upgraded to v.9 (from v.4.5). I have 2 databases which are similar except for 1 has last_name, first_name (called Individuals) and the other just has company (which is called Dealers). I changed the looks of a lot of my forms first on the Individuals database, then copied the entire database for Dealers, deleted all the records, and imported all the data from my 4.5 database.

    On my Invoice form, when I tab to the "Customer ID" in my Dealer database, a window should pop up and I select my dealer (which works fine in my "Individual" database.

    I get an error message:

    Cannot create lookup.
    Lookup definition incomplete or invalid.

    No such field.

    I'm not sure where to find and correct this error. I'm sure it's somewhere where it's still looking for last_name, but can't find it.

    Any suggestions where to look to correct it?

    Thanks.

    CB

    #2
    Re: Help - "cannot create lookup"

    Check the field rules for the parent table upon which the Invoice form is based. Specifically whatever field in that table is represented by the "Customer ID" field object on the Invoice form.
    There can be only one.

    Comment


      #3
      Re: Help - "cannot create lookup"

      I am attaching a screen shot. I can't see anything wrong in my parent table (customer).

      I don't know where else to look for the error.

      CB

      Comment


        #4
        Re: Help - "cannot create lookup"

        Carol:
        It seems to me that you are trying to plant in CustomerID field in Customers table the cutomerID itself. You should set up CustomerID field in Invoices table as LU.
        So: delete the LU field rule that you created in Customers table for CustomerID and go to Invoices table and set up customer ID there as LU.
        Usually CustomerID in Customers table is an autoincrement and should not be accessible to the user.
        The very first box tells you that you are in Customers table not in Invoices table

        Comment


          #5
          Re: Help - "cannot create lookup"

          I tried that and I'm still getting the same error message.

          Carol

          Comment


            #6
            Re: Help - "cannot create lookup"

            Post a sample of the database, with dummy data, so we can inspect it.

            Your Customer_id field is not an autoincrement field is it?

            Comment


              #7
              Re: Help - "cannot create lookup"

              I've attached it.

              Carol

              Originally posted by Tom Cone Jr View Post
              Post a sample of the database, with dummy data, so we can inspect it.

              Your Customer_id field is not an autoincrement field is it?

              Comment


                #8
                Re: Help - "cannot create lookup"

                Carol, your table lookup field rule in the Invoice_header table uses an invalid "ordering" expression. The lookup list cannot be displayed in the order you have specified because the fields you specify don't exist in the lookup table (Customer).

                Also, it's not necessary to link the lookup table into the set in order to use a table lookup field rule, so you may find it advisable to remove the Customer table from your Invoice set... or at least change its link to a one-to-one. A one-to-many doesn't seem to fit the typical requirement, since presumably an invoice will be linked only to one customer.

                Comment


                  #9
                  Re: Help - "cannot create lookup"

                  Carol,

                  In the sample you attached the lookup field rule still specifies the first and lastname fields. Also there are three event code snippets which restrict enters and edits on the Invoice form. Rather difficult to create an invoice under those constraints.
                  There can be only one.

                  Comment


                    #10
                    Re: Help - "cannot create lookup"

                    how do I view and correct the "code snippets"




                    Originally posted by Stan Mathews View Post
                    Carol,

                    In the sample you attached the lookup field rule still specifies the first and lastname fields. Also there are three event code snippets which restrict enters and edits on the Invoice form. Rather difficult to create an invoice under those constraints.

                    Comment


                      #11
                      Re: Help - "cannot create lookup"

                      With the form in design mode, right click on the background, choose Events, select the oninit, onfetch, and onsave - one at a time. Hilight the code and delete it. Save, close, and do another.

                      Unless you have some reason the have the code there.
                      There can be only one.

                      Comment


                        #12
                        Re: Help - "cannot create lookup"

                        okay - each of those (OnFetch, OnInIt, OnSave) only have this in:

                        ''XBasic
                        this.restrict_change=.t.
                        this.restrict_enter=.t.

                        OnKey has this:

                        ''XBasic
                        if this.mode_get()="VIEW" then
                        if a_user.key.event="down" then
                        select
                        case upper(a_user.key.value)="C"
                        this.restrict_change=.f.
                        a_user.key.handled=.t.
                        cust_balance.activate()
                        cust_id.activate()
                        case upper(a_user.key.value)="E"
                        this.restrict_enter=.f.
                        a_user.key.handled=.t.
                        this.new_record()
                        end select
                        end if
                        end if


                        I also went into the customers.dbf and corrected the "last_name" & "first_name" stuff - (corrected image below)

                        I'm still getting the error messages that refers to Last_name & first_name.

                        This is too tough for me to try to figure out. I'll go back to using my older version of Alpha for this database.

                        Everything worked fine for the other database I had. The only difference was that this one has "Company" instead of Last_name & First_name.

                        Carol



                        Originally posted by Stan Mathews View Post
                        Carol,

                        In the sample you attached the lookup field rule still specifies the first and lastname fields. Also there are three event code snippets which restrict enters and edits on the Invoice form. Rather difficult to create an invoice under those constraints.

                        Comment


                          #13
                          Re: Help - "cannot create lookup"

                          oops - forgot to attach image

                          Comment


                            #14
                            Re: Help - "cannot create lookup"

                            Carol,

                            The screenshot I attached earlier had to do with the invoice_header table - not - the customer table. I think Tom pointed out earlier, you seem to be trying to lookup customer information from present customers. The point of the lookup is to avoid having to fill in all the fields on the invoice_header when the information already exists in the customer table. You don't need/want a customer_id lookup in the customer table. You loookup information for the invoice from the customer table.

                            If you define the customer_id lookup as you have, how can you enter new customers?

                            Whichever form you were working with when you removed the code (customer/invoice_header) the other has the same code.
                            There can be only one.

                            Comment


                              #15
                              Re: Help - "cannot create lookup"

                              I changed the "lookup" in the customer database to no lookup and went into the invoice-header table and did the lookup there.

                              Still getting the same error message.

                              I guess I just don't get it. I'm ready to just give up. I've spent all day trying to get it to work.

                              I had all this the same in my Individual database, like I said and everything worked (I had the lookup in the customer table there). The only thing different between the 2 databases was the Individuals had last_name & first_name fields, and the dealer database did not.


                              Carol



                              Originally posted by Stan Mathews View Post
                              Carol,

                              The screenshot I attached earlier had to do with the invoice_header table - not - the customer table. I think Tom pointed out earlier, you seem to be trying to lookup customer information from present customers. The point of the lookup is to avoid having to fill in all the fields on the invoice_header when the information already exists in the customer table. You don't need/want a customer_id lookup in the customer table. You loookup information for the invoice from the customer table.

                              If you define the customer_id lookup as you have, how can you enter new customers?

                              Whichever form you were working with when you removed the code (customer/invoice_header) the other has the same code.

                              Comment

                              Working...
                              X