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

Create New Records Based on Several Tables

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

    Create New Records Based on Several Tables

    This problem is still on paper for me and this involves xbasic beyond my thought limits and I was hoping for a big push.

    Essentially I need to create a memo, the memo will have a one-to-many link which departments it is applicable to, could be one, could be five or so.

    Once the memo is created I need to track who has to read this memo.

    My thought is to create a record in a new table that has the employee number and the memo number and a logical field to state if they read it or not. My problem is the xbasic code to look at the one-to-many link to departments, determine the applicable departments, then find all the active employees (logical field in the employee table) for those departments, and write the record.

    I have used xbasic to write very basic records but nothing that involves arrays of data like this and I could use a big learning push here. Thank you for your time in advance.

    #2
    Re: Create New Records Based on Several Tables

    John, this is not so difficult if you track the "Read it" button.
    Have a think about this.
    I have a system which sends emails to team members when the task they were due to complete has not been reported as complete.
    They keep getting regular reminders until the job is done or they reschedule. I use an OnTimer in a Form.
    Now, if you have a table with the departments in it, linked to the current memo with a "read it" flag which captures the data and time and person logged in, you will have a decent level of control.

    The deveil is in the detail, but off the top of my old grey head, I'd have something like this in mind;

    A Table with Departments in it as you suggest. There will need to be different levels of application of the memo.
    ..Memo Date and Content Identifier or some other identifier - so Memo type 00123 goes to Marketing, All marketing staff, Production, Supervisors only.
    ....Department+Memo+Content Identifier+Read it flag and audit details.

    OnTimer, I'd send either an email reminder where Read It = "", or have the Memo Reminder display in their Log-On screen service area.

    So, suggest you identify the depts, the memo specifically, and a way of getting them to confirm with a tick box. If the memo is a report, you can put the tick on the reports so it's a simple click through for the user. Put it at the bottom though!

    Finally, I wouldn't think you need any Xbasic, and most if not all could be done with Action Scripting but I'm sure someone will correct me if I'm wrong.
    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: Create New Records Based on Several Tables

      I disagree Ted,
      I have tackled this before and still do not have a firm opinion on the best way of doing this. See this thread. Not many takers. Difficult subject. But maybe my needs were more than what John needs.

      http://msgboard.alphasoftware.com/al...highlight=read
      Mike W
      __________________________
      "I rebel in at least small things to express to the world that I have not completely surrendered"

      Comment


        #4
        Re: Create New Records Based on Several Tables

        Then I have obviously misunderstood.
        In simple terms it is like getting a Read Receipt for an email.
        Similar to a message that displays when a person is using software that isn't licensed.
        I read the post link Mike but haven't looked at the zip yet. I'll do that over the weekend.

        Edit:
        On second thoughts I can't afford the electricity bill to build the documents. I'll try and put an example of what I mean together instead.
        Edit 2:
        Sorry Mike, I was working with V10.5 so that might be why the extract didn't work.
        Last edited by Ted Giles; 06-09-2012, 03:19 AM.
        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: Create New Records Based on Several Tables

          Mike & Ted,

          Thank you for your guidance here. I looked at the demo and this is a bit more complex but similar in functionality. My goal is as each user logs in they are taken to a browse on a form that has the abstract of each memo that they have been assigned to read and there will be several variables to act as filters for the memos such as a date range, category of memo, If they have read it or not etc. I need to be able to run reports to say if it has been read or not. I think I like the method 1 version of your demo as that is what I was thinking about.

          Ted,
          I do not understand where the record or logical is kept for each person reading a memo and how they are applied to each memo.

          Comment


            #6
            Re: Create New Records Based on Several Tables

            Summut like this.
            Attached Files
            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


              #7
              Re: Create New Records Based on Several Tables

              Ted,

              First apologize for the delay. My wife gave birth the weekend after your post and I have been out a week. Your example is exactly what I am talking about. I added a few more people and added a "Department" to them with a Departments table. This is where I have my problem. When someone adds a memo, I need to capture what department the memo is applicable to. I am not sure the best way to do this multiple selection except to hard code it, but would rather use the departments table to populate a dynamic list to have the choice to enter many departments. Here is the second rub for me, Once the memo is created, how to then find all the associates who the memo is applicable to and create a record for each of them in the "read_it" table? Attached is the modified file with a departments table.
              Attached Files

              Comment


                #8
                Re: Create New Records Based on Several Tables

                I had a thought. What if you only create a child record if the person has read the memo. The question is can you easily filter/search if there is no child record?

                Comment


                  #9
                  Re: Create New Records Based on Several Tables

                  John,
                  The difficulty comes in when trying to have the combined capabilities to identify those assigned to read and then also needing to filter for memos that have or have not been read. Having gone through this before, I think the most straight forward way is to have a memo field in the connecting table that collects the user_id's when they sign off having read the memo. Attached is an example using your posted example.
                  Attached Files
                  Mike W
                  __________________________
                  "I rebel in at least small things to express to the world that I have not completely surrendered"

                  Comment


                    #10
                    Re: Create New Records Based on Several Tables

                    I like the method here. I have almost never worked with crlf() data before and this poses some challenges for me. What I envisioned is first having a green dot or red dot in the browse indicating if it is read or unread by the person. With the data in a memo field, would it be possible/practicle to build a calculated field to do this? Also, is it possible to check the memo field for a duplicate name entry and not write it if it exists? The way it shows now you have to select a dept to view the memos, could this be done via a search, to clairfy, I was thinking of having the users see all the memos and having various restrictors on top of the browse, i.e. a date range, created by, the department, and category( I wanted to add a category to the memo, i.e. policy or customer note etc.), as well as a body text search. I see the value in this being associates looking up old memos based on a small tidbit of data. Thanks for your thoughts and work on this.

                    Comment


                      #11
                      Re: Create New Records Based on Several Tables

                      Originally posted by johngtatp View Post
                      What I envisioned is first having a green dot or red dot in the browse indicating if it is read or unread by the person.
                      .
                      I don't know how many memo's you are talking about, but this indicates all memos, read and unread, would be displayed. I personally wouldn't want to be having to deal with read memos. Read them, sign off and move on. Have the capacity to filter for the read and unread so you can focus on the need.

                      With the data in a memo field, would it be possible/practicle to build a calculated field to do this?
                      Not sure what your thinking here. If you want a color background to appear in a field within a Browse based on the presence of the value of a field (in this case the userid being in the memo field, which means it's been logged as having been read), you highlight the Browse column, goto Properties > Other > Color, enable color expression and add color expression var->vg_userid $ memo_dept-> Readers.


                      Also, is it possible to check the memo field for a duplicate name entry and not write it if it exists?
                      Of course. Wrap the code in the log_as_read() UDF that writes to the userid to the table with:
                      Code:
                       if vg_user !$ t.reader   ' add if id not in memo field
                      ...write code here
                      end if
                      (be sure to include end if). This isn't needed if you prefilter the group to present those that are not read to begin with.

                      The way it shows now you have to select a dept to view the memos...
                      Not true. Push the Memo button on the main menu and you will see all the memos.

                      , could this be done via a search, to clairfy, I was thinking of having the users see all the memos and having various restrictors on top of the browse, i.e. a date range, created by, the department, and category( I wanted to add a category to the memo, i.e. policy or customer note etc.), as well as a body text search. I see the value in this being associates looking up old memos based on a small tidbit of data.
                      Sure, this can all be done. It's a challenge, so study the structure and ponder what you want to have happen and I'm sure you can work through some stuff.
                      Mike W
                      __________________________
                      "I rebel in at least small things to express to the world that I have not completely surrendered"

                      Comment


                        #12
                        Re: Create New Records Based on Several Tables

                        Thank you for your response and this seems doable. I need to be able to see all the memos as they are reviewed frequently. This system will be used as a pass-down log so that information from shift to shift is passed along and sometimes it needs to be re-read.

                        My last question is since I have never worked with dilmited fields, is how can I run a report to show me the memos and who has not read them? How should the filter look?

                        Comment


                          #13
                          Re: Create New Records Based on Several Tables

                          The reason this is difficult is not that "who hasn't read this memo?" is the question, it is that it is a double tiered question with a different point of focus - "Who is supposed to have read this memo that hasn't ? And you have to also include a third tier of what memo's come into the question. All memos? Memo's from yesterday? For a particular department? It get's complicated very quickly.
                          Attached Files
                          Last edited by Mike Wilson; 06-22-2012, 05:39 PM. Reason: ADDED EXAMPLE
                          Mike W
                          __________________________
                          "I rebel in at least small things to express to the world that I have not completely surrendered"

                          Comment


                            #14
                            Re: Create New Records Based on Several Tables

                            Hi John, I've been away in the RV for a while. I think I understand the issue.
                            What would help here is a State Machine Diagram - this explains the state of the memo and response.
                            Can you document the process in Visio?
                            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


                              #15
                              Re: Create New Records Based on Several Tables

                              Originally posted by johngtatp View Post
                              Ted,
                              First apologize for the delay. My wife gave birth the weekend after your post and I have been out a week.
                              Sorry John, many congratulations to you and your good lady - Boy or Girl?
                              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