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

Incrementing field in grandchild of set.

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

    Incrementing field in grandchild of set.

    Hi,
    I have a set, parent, linked 1:many to child linking table, which is linked 1:1 to grandchild.
    I want to have a form to enter new records to both the parent and the grandchild of the set. I have that ok.
    I have a field (cliente num) of the parent which should be incremented at each new entry. That works ok.
    I have a field (firm num) of the grandchild which should be incremented at each new entry. That doesn't work.
    I have the field rules set up at the table level. At the table level the field increments correctly on the grandchild table. As viewed as a set the table rules follow.
    Those field values of the parent and grandchild tables will not always be the same. I want the grandchild table field to increment from the previous number in that field - as there may be instances when the table has new entries not using that set.

    Any suggestions will be appreciated.

    Brian

    #2
    RE: Incrementing field in grandchild of set.

    Brian,

    You don't give the full picture.

    Are you saying you have established an autoincrement field rule for the grandchild table?

    Are you using that field as a linking field in your set?

    Does your set have referential integrity enforced in the set design screen.

    You say the increment doesn't "doesn't work" when you view the grandchild as part of a set. What does this mean? Precisely what do you see--a blank field, an invalid number
    Can we assume you have built a form based on the set and this is where you have problems. Does the form have 2 embedded browses. Do you observe the same behavior when you use the set's default form?
    Bill
    Bill Hanigsberg

    Comment


      #3
      RE: Incrementing field in grandchild of set.

      Bill,
      Thanks for the response.
      The parent table has a field "clinumber",
      - linked 1:many to child table with 2 fields; "clinumber" and "firmnumber".
      - which is linked 1:1 with grandchild table, which has field "firmnumber".
      Linking fields are:_
      - parent:- clinumber, linked to child: clinumber
      - child:- firmnumber, linked to grandchild: firmnumber


      Yes, I have made an autoincrement field rule for the grandchild table on field "firmnumber", (linking field).
      Have tried with and without ref integrity enforced in the 2 links. Doesn't change things.

      I want to enter a new record, using a form on the set. I want the grandchild field to increment. When the curser enters that field nothing happens - no increment or anything, it leaves a blank field.
      The form has no embedded browses, only fields of the parent and grandchild tables.

      Going to the default form, it shows the parent table's form fields, and a browse table of the grandchild table.
      It does not show the child table - maybe that is because the values of the fields of the child table are also there in the parent and grandchild tables ?
      Entering a new record on the default table has the same result, the parent increments, the grandchild field as shown in the browse table does not - just stays blank.

      There will be different places to enter records in what is now the grandchild of this set, so I need to increment the field rather that set the field to the same as the parent.


      Thanks for the help

      Brian.

      Comment


        #4
        RE: Incrementing field in grandchild of set.

        Hi Brian,

        Well that certainly was clear!

        Start with something simple:
        "[The default form]...does not show the child table...." This is normal. Since child links 1:1 to grandchild it looks like a simple flat table to the set.

        You are certainly confronting a contradiction between the autoincrement rule and your set definition, specifically the 1:1 link between the client_firm and firm tables.

        I actually think the link may be a mistake and should be replaced by a 1:N link (one to many). But I cannot say whether this change is compatible with your needs. So may I ask what, precisely, are you trying to do with this set.

        Typically you would use a linking table in the following way:

        1. Client linked 1:1 to client_firm linked 1:N to firms
        and
        2. Firms linked 1:1 client_firm linked 1:N to clients

        Set one displays firms by client and set two displays clients by firm.

        Bill
        Bill Hanigsberg

        Comment


          #5
          RE: Incrementing field in grandchild of set.

          Bill,
          Thanks for your response, and your time.

          I guess that you meant my explanation wasn't clear, sorry for that, but I am new to A5, and still getting used to writing on this board; helpful as it certainly is.

          We have a small tool/plant hire company in Portugal. We have clients who work for themselves at weekends, and various firms at various times. We also, as normal, have firms with several employees.
          We want thus to list various firms linked to one client, and various clients linked to one firm.

          Yr second para:
          ok, if that is normal, no problem not showing the linking child table.

          Yr third para:-
          maybe my bad explanation. I don't have a link between client table and firm table.

          It is a set of three tables:-
          -clients(parent),
          -link(child),
          -firms(grandchild).

          Links are:-
          - parent to child:- clinumber field of parent 1:N to clinumber field of child.
          - child to grandchild:- firmnumber field of child 1:1 to firmnumber field of grandchild.

          Indexes are on those fields in all cases.

          What is the contradication, or are field rules only applicable to the parent of a set, surely that cannot be ! (I hope).
          I am coming from A4, where there were field rules for sets, and also for the tables. I understand that A5 does not have that advantage, but I don't see that as the problem here.

          If I do an enter on the firm table as an indepedant table, (not part of the set) the autoincrement works. As part of this set the autoincrement doesn't.

          I have tried your set concept and it does not result for our situation. It ends up as effectively a 1:1 result.
          I was told to construct the set in this way, and it works well, so far. It gives the result of one client being linked to many firms, and one, or many,of the firms being selectable for each record of the set.

          Basically as I see it, I am trying to enter a new record, both to the parent table and the grandchild table using the form of a set. I can enter data manually to the fields of the grandchild, so I thought that field rules should be able to enter data also. Is there a contradiction I am not seeing ?

          Thanks for your help,

          Brian.

          Comment

          Working...
          X