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

Marking records

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

    Marking records

    I hope I describe this correctly. I have tables called File, Client and Accident. Each has a a unique ID Field. One file has one client and one accident only (though one client can have many Files or one Accident many Files). In the File Table is a field for the client ID and another for the accident. This was originally part of a database set up in 2003 using version 5.

    I am now updating to version 10.5. In the last seven years about 4000 new records have been set up in the File table, and close to that in the client and accident. There were about 5000 records already in the tables from a previous database program (the much loved Q&A). Now the problem. The person(s) in my office who sets up new cases have had a tendency in the last few years to begin the process, create the Client record, go to lunch or something like that, and then come back and end up recreating the Client Record, and finish the process. There could be five client records, each with their own ID, and one File with one of those IDs. In the search client dialog box, you would see one client multiple times, and have no idea but by trial and error to figure out which one was associated to a File.

    Now that I have spent my time (and while, as clear as this is, I am not a programmer, I love this stuff) redesigning the application I want to go back and delete the extraneous client records -leaving only those who have a File record associated with it. How do I design this operation? It must mark Client records that are not associated with a File records. The key is the Client ID.

    This is not going to make or break the fact that after this weekend we will be using version 10.5 in our office. It is perplexing me -any thoughts or suggestions would be appreciated.

    #2
    Re: Marking records

    The Delete operation sounds so straight-forward that I must be missing something!

    If the field for file records has no data you want to delete them it sounds like....then the condition you tell the genie to use could be Your_File_Record_Field<>"" or maybe even isnotblank("Your_File_Record_Field") if this is a character field....for numeric, date, whatever there are similar filters...but you didn't tell us what it is so I guessed character! :)

    I also assumed you did want to use a delete operation and not just a mark operation...the same filter would be used for either so is actually a moot point.
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________



    Comment


      #3
      Re: Marking records

      I am not being clear, and I apologize. The "Client Table" has a unique ID ("CL0001" that is automatically incremented for new record. The "File Table" has two fields - a unique ID ("F00001") and a Client ID from the Client Table. It is a one to many relationship -one Client can have many files, one File can have only one Client.

      Theoretically every Client record should be connected to at least one File record.But in practice there are many Client records without an associated File Record. My question is how to find those Client Records. It is sort of asking the program to discover a negative -i.e. look for Client records not associated with any particular File record. There is no empty fields per se.

      Comment


        #4
        Re: Marking records

        To get a list of the client records without files:

        Code:
        dim vLfiles as C					' list of file records unique for each client
        vLfiles=table.external_record_content_get("filetable","client_id","client_id","unique_key_values()")
        
        dim vLclients as C				'list of all client records
        vLclients=table.external_record_content_get("clienttable","client_id","client_id","")
        
        dim vLempty_clients as C
        vLempty_clients=word_subtract(vLclients,vLfiles,crlf())	 'subtract the file list from client list leaving clients without files
        To mark client records without files:
        Code:
        dim vcid as C
        dim t as p
        t=table.open("clients")
        t.fetch_first()
        while .not. t.fetch_eof()
        	vcid=t.client_id
        	if a5_get_records_in_query("filetable","client_id="+quote(vcid))=0
        		t.change_begin()
        		t.mark()
        		t.change_end(.t.)
        	end if
        t.fetch_next()
        end while
        t.close()
        Last edited by Mike Wilson; 08-25-2010, 10:30 AM.
        Mike W
        __________________________
        "I rebel in at least small things to express to the world that I have not completely surrendered"

        Comment


          #5
          Re: Marking records

          An alternative to what Mike said would be to use Substract operations....same thing basically, just doing it on a table basis instead of a list.....I have used both depending probably just on my mood at the time as I do not think much difference in either way. :)
          Mike
          __________________________________________
          It is only when we forget all our learning that we begin to know.
          It's not what you look at that matters, it's what you see.
          Henry David Thoreau
          __________________________________________



          Comment


            #6
            Re: Marking records

            Your message came just as I finished doing it that way. Because I am not very good with code at first i was still lost. But the code is very logical -I could understand what Mike was advising me to do -I just could not execute it. What I like about the program is that there is likely some way to do many, many things with the build in genies and action scripting etc. I stumbled across the subtract operation and accomplished what I needed to do.

            I have not often used this message board but very much appreciate that when I have the responses have always been helpful. The great thing is that in learning the answer to one specific problem, I learn a more about the software itself.

            Comment

            Working...
            X