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

Select Primary Record

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

    Select Primary Record

    In my application I have a "Contacts" table which contains the names and contact info for each person at each company I deal with. I also have a "Company" table which contains the company information. I have made a form which shows the company info and basic contact info for one person at each company "Main Page". I have also made another form that shows the detailed contact info for all contacts at each company "Contact Page". All contacts are listed in a browse. Click on the persons name and the detail are displayed in the fields on the form.

    I want to have a checkbox on the form that will allow me to designate who the Primary Contact is for that company. Checking the box will make that record appear as the contact in the "Main Page" form. When the checkbox is clicked, it should automatically deselect any checked box for a different contact within that same company.

    I like the checkbox idea better than a drop down list but am not exactly sure how to get this rolling. I hope this makes sense. Any thoughts?

    #2
    Re: Select Primary Record

    All contacts are listed in a browse.
    I want to have a checkbox on the form
    You need a checkbox in the browse since that is where the child table records appear.
    There can be only one.

    Comment


      #3
      Re: Select Primary Record

      I have tried that already but it allows multiple records to have checked boxes. Only want one record per company to have a check in the box.

      Comment


        #4
        Re: Select Primary Record

        Are you storing basic contact field values for the priimary contact inside the company table? If not, how are you populating the basic contact field values in your "company" form?

        Comment


          #5
          Re: Select Primary Record

          Originally posted by Quinlivan View Post
          I have tried that already but it allows multiple records to have checked boxes. Only want one record per company to have a check in the box.
          I was pointing out that the form is not the place to have the checkbox. Now you need something to uncheck any other checked boxes when you check a box in the browse.

          I'll have to look for an example.

          Check this thread. discussion of using the Events Event in embedded browses to handle an onchange situation.
          Last edited by Stan Mathews; 10-30-2009, 08:37 AM.
          There can be only one.

          Comment


            #6
            Re: Select Primary Record

            Tom... Company table contains only two fields, "Company_Name" and "Company_ID". Company table is parent to Contact table via one-to-many. Could this possibly be part of the problem? I am new at this and figuring out the intricacies of Sets via trial and error.

            Comment


              #7
              Re: Select Primary Record

              There's no problem, just trying to figure out what you've got. There are several ways to achieve your goal, but most will involve special coding.

              Later on...

              If you have some programming experience developing a solution that matches your design will be a good learning exercise. If you don't then you might want to try a non-programming solution. If you add fields to the parent table to hold the primary contact name you can define a filtered table lookup field rule that would permit the user to choose the primary contact from a short list of all the contacts for that one company. This creates a bit of redundancy because the primary contact info is now in two tables, but it would be easy to implement.

              If you prefer a programming solution, zip a copy of your database and point us to the tables involved. Use dummy data to protect the privacy of your live data. You can attach the zip copy to a reply post in this thread. Use the Go Advanced button to open a more advanced message editor, that lets you manage your attachments.
              Last edited by Tom Cone Jr; 10-30-2009, 11:08 AM.

              Comment


                #8
                Re: Select Primary Record

                Tom, tell me if you think this may work. First, add fields in the Company Table to hold basic contact info.

                1. If checkbox is clicked to .t. fires onchange event.
                2. Changes all values in field to .f. for records with matching Compmay-ID.
                3. Sets field value for current record to .t.
                4. Sets field values of contact info fields in Company Table to that of what is in the Contact Table for current record.

                It sounds easy but not sure how write. Do I use variables or indexes??? Will see if I can get to work if you think this sounds ok.

                Comment


                  #9
                  Re: Select Primary Record

                  Tom... I was able to get it to work with Action Scripting. Used variables and custom queries to find and hold numbers and set the field values to where they needed to be.

                  1. Set variable to Contact_ID
                  2. Set Variable to Company_ID
                  3. Run Custom Query to find the one record that had .t. in primary contact field.
                  4. Set field value of queried record to .f.
                  5. Save Record
                  6. Run Custom Query by Contact_ID in variable to bring up the original record.
                  7. Set field value of queried (original) record to .t.
                  8. Save Record
                  9. Run Custom Query by Company_ID to repopulate browse.

                  Comment

                  Working...
                  X