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

Using a Date for a Lookup field rule

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

    Using a Date for a Lookup field rule

    I can't get this to work properly. If I define the field rule order using the datefield it sorts by the year. If I make it dtoc(datefield) it sorts ok but in neither case will the lookup table scroll to the first matching record like other field rule lookups do as the user types the data. I have an index on the lookup table for both scenarios.

    Am I missing something in how I am expecting this to work?
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

    #2
    Re: Using a Date for a Lookup field rule

    Could you explain a bit more Robin?
    Are you trying to locate a record based on the whole value in a date field?
    See our Hybrid Option here;
    https://hybridapps.example-software.com/


    Apologies to anyone I haven't managed to upset yet.
    You are held in a queue and I will get to you soon.

    Comment


      #3
      Re: Using a Date for a Lookup field rule

      I am looking up a member table on the date of birth field where the records are ordered by DOB. When I use a drop down, I get a list but the sort is by year first then month and day. So I tried a popup lookup but in the default form for the appointment table when I open the lookup, I get a calendar and not the lookup I've defined. Something is definitely wrong - unless this is how date fields behave in v12.

      I am using v12 4.3.2 build 4119-4825. Can you do a test and see if it is the same for you?
      Last edited by MoGrace; 01-11-2018, 02:39 PM.
      Robin

      Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

      Comment


        #4
        Re: Using a Date for a Lookup field rule

        Sorry Robin, I don't have V12.
        See our Hybrid Option here;
        https://hybridapps.example-software.com/


        Apologies to anyone I haven't managed to upset yet.
        You are held in a queue and I will get to you soon.

        Comment


          #5
          Re: Using a Date for a Lookup field rule

          I may have a work around. I am using a temp table for the member lookup, so I added a new character field 'lu_dob' and ran an update then made it a calc field using :

          if(dob<>{},dtoc(dob),"")

          Now my lookup can link to this field and the user can type '10/11' and scroll the table to find records that begin with that mm/dd. I sort the lookup on dtoc(dob) and only display and fill in the dob field. And since the 'link' is now a character field, I also added a filter. The only thing still not working is 'popup on entrance', but I can work around that on my form with an OnArrive event that opens the drop down or I can use an OnKey event that defines the F10 key to do the same.

          Still need to test in my form to see if it will bypass the calendar popup...works fine in the default browse.
          Robin

          Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

          Comment


            #6
            Re: Using a Date for a Lookup field rule

            Well that didn't work. The popup calendar appears even when set to the type in field format. I really didn't want to add another field to my appointment table, but I need this lookup to work...
            Robin

            Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

            Comment


              #7
              Re: Using a Date for a Lookup field rule

              I have 3 projects running Robin, so time is tight.
              I will look over the weekend and see what I can come up with - if anything as you way ahead of me.
              As Stan says "there is only one". In my case it's " with Alpha, there is always a work around "
              See our Hybrid Option here;
              https://hybridapps.example-software.com/


              Apologies to anyone I haven't managed to upset yet.
              You are held in a queue and I will get to you soon.

              Comment


                #8
                Re: Using a Date for a Lookup field rule

                I checked out the object properties and though it reports it is a type in field the calendar still shows. Alpha must be setting this somewhere...

                I can do a edit record list dropdown for my search but using a field puts the record in change mode. So I will try a variable instead and code my own lookup to fill in the fields. Pooh...
                Robin

                Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                Comment


                  #9
                  Re: Using a Date for a Lookup field rule

                  In searching the Wiki, I discovered that it is possible to turn off the date picker on a grid. So I sent in a request to ask if this feature is available for a date field on a form in the desktop. Will let you know...
                  Robin

                  Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                  Comment


                    #10
                    Re: Using a Date for a Lookup field rule

                    a5.System_Mode_set("field_popup_button_position","inside") hides the calendar.
                    I tried using a calculated field in the members table based on a sub string of the dtoc(date) field [01/01] and got a little way.
                    See our Hybrid Option here;
                    https://hybridapps.example-software.com/


                    Apologies to anyone I haven't managed to upset yet.
                    You are held in a queue and I will get to you soon.

                    Comment


                      #11
                      Re: Using a Date for a Lookup field rule

                      I use that setting in the Autoexec, but as soon as you click on the date field (set to type in style) it appears as a dropdown and the calendar pops up instead of my lookup table.
                      Robin

                      Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                      Comment


                        #12
                        Re: Using a Date for a Lookup field rule

                        Originally posted by MoGrace View Post
                        I am looking up a member table on the date of birth field where the records are ordered by DOB. When I use a drop down, I get a list but the sort is by year first then month and day. So I tried a popup lookup but in the default form for the appointment table when I open the lookup, I get a calendar and not the lookup I've defined. Something is definitely wrong - unless this is how date fields behave in v12.

                        I am using v12 4.3.2 build 4119-4825. Can you do a test and see if it is the same for you?
                        Hi Robin,
                        I am sorry, but I have read this thread over and over again and I can't figure out what you are really trying to do. I quoted this particular post because this one is the most confusing. The first sentence is clear and seems very reasonable. It seems that you are trying to filter the Member table based on a date of birth. This seems like bread and butter stuff. Open an xdialog to collect the date of birth and filter the Member table to the entered date. Is this not an option? And then a switch to discussing an appointment table and a default form...? I'd like to help but things are just not clear enough to grasp what you're trying to acheive.
                        Mike W
                        __________________________
                        "I rebel in at least small things to express to the world that I have not completely surrendered"

                        Comment


                          #13
                          Re: Using a Date for a Lookup field rule

                          Hi Mike,
                          What I am trying to do seemed simple enough: use the DOB field in one table to look up a matching record(s) in another table that can be used to fill in the fields in the first table. But I cannot get a field rule lookup on a date field to work because it will only pop up a calendar when that date field with the lookup rule is activated on a form. It works fine on a browse.

                          Does that make sense (I hope)?
                          Robin

                          Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                          Comment


                            #14
                            Re: Using a Date for a Lookup field rule

                            As with most Contact type lists, users do not always fill in all the fields or they misspell a name, so several lookups are needed to find the right record. I am using table lookups in the field rules for the Last Name, Photo_id, SSN & DOB fields to try and locate the correct record - then if found, fill in the rest of the fields in the target table. The date field is the troublemaker here as the lookup only works in a browse.

                            When I tested the members table of 490 records there were 21 blank DOB fields, 39 blank SSN & 67 blank Photo ID's. I didn't keep count of the duplicate records I already removed where the Last Name-Firstname-MI was misspelled or incomplete. So you can see that entering a DOB into a search is probably my best bet since everyone knows when they were born. Which doesn't prevent the user from not entering the date - hence the blank fields.

                            Surely someone in here has faced this scenario already...?
                            Robin

                            Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                            Comment


                              #15
                              Re: Using a Date for a Lookup field rule

                              Yes. In Social Care in the UK, we have a problem with identifying the correct claimant.
                              There is one unique reference, and it is the NHS (National Health Service) number.
                              There cannot be duplicates, really cannot.
                              Dave Mason uses a SC number for his Blood Monitoring app. Those are also unique I believe within the USA?
                              DoB, Zip, First, Last name and address are all subject to transformation. People think identifying dupes based on names is easy. It isn't. It can take many comparisons with first and last reversed, spelling errors, spurious characters, missing bits, you name it.
                              SSN should be mandatory. DoB is not always known, especially with illegals or immigrants.
                              See our Hybrid Option here;
                              https://hybridapps.example-software.com/


                              Apologies to anyone I haven't managed to upset yet.
                              You are held in a queue and I will get to you soon.

                              Comment

                              Working...
                              X