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

Limitations on Filter for Table Lookup

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

    Limitations on Filter for Table Lookup

    Is there a limitation on how many filters work?

    This works:
    COUNTY1"Do Not Use" .and. Dr_Id_Number Client->DnuDr1 .and. Dr_Id_Number Client->Dnu_Dr2 .and. Dr_Id_Number Client->Dnu_Dr3
    This does not:
    COUNTY1"Do Not Use" .and. Dr_Id_Number Client->DnuDr1 .and. Dr_Id_Number Client->Dnu_Dr2 .and. Dr_Id_Number Client->Dnu_Dr3 .and. Dr_Id_NumberClient->Dnu_Dr4

    #2
    RE: Limitations on Filter for Table Lookup

    If memory serves there's a problem with using filtered table lookups by field rule. Others have had better success creating a custom form and using it as the lookup source.

    -- tom

    Comment


      #3
      RE: Limitations on Filter for Table Lookup

      I'm not sure if there is a limitation or not, but you might see if this works.

      COUNTY1"Do Not Use" .and. .not.
      inlist(Dr_Id_Number,Client->DnuDr1,Client->Dnu_Dr2,
      Client->Dnu_Dr3,Client->Dnu_Dr4)

      Comment


        #4
        RE: Limitations on Filter for Table Lookup

        Thanks John,

        COUNTY1"Do Not Use" .and. .not.
        inlist(Dr_Id_Number,Client->DnuDr1,Client->Dnu_Dr2,
        Client->Dnu_Dr3,Client->Dnu_Dr4)
        Does not work, but,
        COUNTY1"Do Not Use" .and. .not.
        inlist(Dr_Id_Number,Client->DnuDr1,Client->Dnu_Dr2,
        Client->Dnu_Dr3)
        Does

        Guess there is a limitation.

        Comment


          #5
          RE: Limitations on Filter for Table Lookup

          If there is a length limit you could create a variable (vFilter) in table definition and give it the value of your filter. The use vFilter as your lookup filter.

          For sure you can use a variable in a table lookup filter expression.

          Bill
          Bill Hanigsberg

          Comment


            #6
            RE: Limitations on Filter for Table Lookup

            Bill,

            I thought about that but the following is a notation on variables...

            "NOTE Variables cannot be used with the Lookup Field Rule."

            Will it work anyway? And how would I define the variable to be the filter?

            - Elke

            Comment


              #7
              RE: Limitations on Filter for Table Lookup

              Elke,

              Where did you read that? Anyway, you can use variables in lookup filter expressions, to a point anyway.

              I created a variable vGender and successfully used the expression gender=vGender as a table lookup filter in field rules.

              However I was not able to include an entire filter expression in a variable and then use that variable (vFilter in the attached example) as the whole filter expression. (And yes, I tried the expression eval(vFilter) as well although *it did evaluate correctly in the expression builder* it would not save.)

              So that's as far as I took it.

              Bill
              Bill Hanigsberg

              Comment


                #8
                RE: Limitations on Filter for Table Lookup

                Bill Elke,
                I don't agree with using a variable in a lookup filter. What Alpha does is automatically build an index for the filter with the filter expression as a part of the index. If the variable value is changing, then the index will have to be rebuilt ( blue bars etc. ). In a multi-user environment I think you will eventually have some bad situations as the index has to be rebuilt with the table opened by others.

                What if you create a calulated field which is the concatenation of the three or four doctors. Then your filter could be a search for the doctor using an Alpha function that will investigate the existence of a specific string within the concatenated field. Bill does something like that in his example in the Learning Forum.
                John

                Comment


                  #9
                  RE: Limitations on Filter for Table Lookup

                  Hi John,

                  You may have a point about a lookup which is volatile but bear in mind that if the query can be optimized its generation will be instantaneous. That has been my experience, and in a multi-user environment. On the other side, Elke's expression wouldn't optimize.

                  Here is where I use a variable in a lookup:

                  In my scheduling software a department chair is associating teachers with a course. The teacher is picked from a lookup. The lookup is filtered to show only that department's teachers. The user's department number is held in a global variable initialized as part of the logon. So the filter is simple,
                  Dept=vDept
                  and is instant.

                  The teacher table has about 1500 records and is not particularly volatile although not absolutely static. There are about 25 simultaneous users.

                  Bill
                  Bill Hanigsberg

                  Comment


                    #10
                    RE: Limitations on Filter for Table Lookup

                    John,

                    Thought about that too, but there are really 20 fields not just four. Each field is an eight digit numeric field. Highest number of char. in a numeric field is 19...

                    Bill,

                    The note on variables is at the bottom of the help section on variables.

                    Comment


                      #11
                      RE: Limitations on Filter for Table Lookup

                      Bill,
                      I'm glad you have had a good experience with this. It's been my experience that lookups with filters ( not using variables just constants ) are more prone to problems than without filters.I guess that's because a filtered index is created and they are more prone to problems.I tried what you are doing and experienced enough problems to discourage me, but after retesting I see that when a simple filter with a variable filter like "state = var->currstate" Alpha does a query and can take advantage of optimization. I'm curious if Selwyn considers this to be a reliable method.Thanks for the explanation.
                      John

                      Comment


                        #12
                        RE: Limitations on Filter for Table Lookup

                        Elke,
                        Since you have up to 20 fields, you might want to set up a calculated field in the table which is a concatenation of the 20 fields (i.e. field1+field2+field3, etc) and then do your filter using the instr() function. That way you are only looking at one field.
                        Pat Bremkamp
                        MindKicks Consulting

                        Comment


                          #13
                          RE: Limitations on Filter for Table Lookup

                          Pat,

                          I couldn't use or find instr() function however

                          CONTAINS(CALC->drdnu,(str(Dr_Id_Number)))=.F.

                          works great.

                          Thank you.

                          Comment

                          Working...
                          X