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

No set Field Rules

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

    No set Field Rules

    I created a complex application in 1993 using Alpha Four (A4). Because of A4�s field rules for sets I was able to produce the application quickly without programming. I did have to write a lot of expressions.

    Now I�m trying to reproduce the application using Alpha Five (A5) without field rules for sets. I don�t know where to begin. I can design the tables, sets and forms; write expressions for a database that would work fine but the data entry is clunky. Let me explain.

    I have a Work Order entry form with parent table Work Order and three linked child tables, Shipping Customer, Billing Customer and Contact.

    When entering a new Billing Customer I would like to get default values from Shipping Customer which can be accepted or over type. Also before this Work Order record is saved I want to auto fill Billing_ID and Contact_ID to the appropriate fields in Shipping Customer to be default values for the next time this Shipping Customer is used.

    Once this Work Order is saved you should not be able to enter it except in the change mode where you can change the Shipping, Billing or Contact but you may not change Shipping, Billing or Contact particulars.

    In A4 I used default expressions and skip expressions at Set Field Rules to accomplish the above actions.

    Can anybody lead me in the right direction?

    #2
    Dick,

    In Alpha Five data entry occurs through tables, not sets. In your set based form you will need to enter the parent table record first.

    The default value field rule could be used in both shipping and billing tables to suggest an ID and Contact field values, using an expression that incorporates either the lookup() or lookupc() functions. These will automatically lookup a record, based on filtering criteria you supply, and return the field value you want.

    People have built amazingly sophisticated apps using Alpha Four. Often they come to Alpha Five and assume they should be able to replicate the entire app easily here. Typically the conversion of the A4 app is their very first A5 database. This is often a mistake. Windows is not DOS. Things work very differently here. I recommend you start small. Build a simple one table form and figure out how to control data entry through it. Learn how Alpha Five's default behaviors work. Learn how to alter them. Learn how to modify the properties of field objects in your form layout. Learn how the event driven paradigm (sp?) works. Learn how to open other forms, prepositioned to specific records. Learn how to open and run reports. Learn the difference in filtering the set first, and then calling the report based on the "currently selected records", and leaving the set unfiltered, but filtering the report at print time. I think your conversion will be much less frustrating and will have a higher probability of success if you wait to work on it until you are thoroughly familiar with how Alpha Five's design tools work.

    --tom

    Comment


      #3
      Originally posted by Tom Cone Jr
      Dick,

      In Alpha Five data entry occurs through tables, not sets. In your set based form you will need to enter the parent table record first.

      The default value field rule could be used in both shipping and billing tables to suggest an ID and Contact field values, using an expression that incorporates either the lookup() or lookupc() functions. These will automatically lookup a record, based on filtering criteria you supply, and return the field value you want.

      People have built amazingly sophisticated apps using Alpha Four. Often they come to Alpha Five and assume they should be able to replicate the entire app easily here. Typically the conversion of the A4 app is their very first A5 database. This is often a mistake. Windows is not DOS. Things work very differently here. I recommend you start small. Build a simple one table form and figure out how to control data entry through it. Learn how Alpha Five's default behaviors work. Learn how to alter them. Learn how to modify the properties of field objects in your form layout. Learn how the event driven paradigm (sp?) works. Learn how to open other forms, prepositioned to specific records. Learn how to open and run reports. Learn the difference in filtering the set first, and then calling the report based on the "currently selected records", and leaving the set unfiltered, but filtering the report at print time. I think your conversion will be much less frustrating and will have a higher probability of success if you wait to work on it until you are thoroughly familiar with how Alpha Five's design tools work.

      --tom

      I used lookupc() in the field rules for default values. The expession gave me the right values but I didn't get anything in actual operation. The expression builder didn't offer the source table for looked up data so I typed in the table followed by a dash and the greater symbol (->). I know I'm not doing it right.

      Dick

      Comment


        #4
        Dick, if you attach a working copy of the sample database you're working on, we can look over your shoulder and offer advice. If you opt to do this, please give us specific instructions to follow in order to see the problem, and a specific description of the behavior you're striving for. --- tom

        Comment


          #5
          Originally posted by Dick Anderson
          I used lookupc() in the field rules for default values.
          There is more than one type of default value (Simple and Conditional) so you would have to tell us which one you used. Also you can specify when the default value is set during actual entry so
          Originally posted by Dick Anderson
          I didn't get anything in actual operation.
          doesn't tell us much.
          Originally posted by Dick Anderson
          The expression builder didn't offer the source table for looked up data so I typed in the table followed by a dash and the greater symbol (->).
          Dick
          if you study the example of lookupc() in the documentation

          tn = table.filename_get("customer")
          lookupc("F", CUST_ID, "LAST_NAME", tn, "CUSTOMER_ID")

          you will notice that -> is not used in a table specification.

          At least show us the lookupc() expression you tried if you don't follow Tom's advice.
          There can be only one.

          Comment


            #6
            Originally posted by Stan Mathews

            At least show us the lookupc() expression you tried if you don't follow Tom's advice.
            I entered this expression.

            Order.Set Field Rules
            B_Cust->B_NAME
            Data Entry
            Simple default expression
            LOOKUPC(�F�,ORDER->SHIP_ID,�S_NAME�,�S_CUST�,�Ship_Id�)
            Expression Builder
            Result: is O.K. record-to-record


            Alphafive created the following expression.

            B_Cust.dbf Field Rules
            B_Cust->B_NAME
            Data Entry
            Simple default expression
            LOOKUPC(�F�,Lookup(�Order�,�Bill_ID=�+chr(34)+BILL_ID+chr(34),
            �SHIP_ID�),�S_NAME�,�S_CUST�,�Ship_Id�)
            Expression Builder
            Result: is O.K. record-to-record

            If I am supposed to attach my application; I'll need detailed instructions on how to do that.

            Thank you

            Dick

            Comment


              #7
              There are no "set" field rules. As mentioned earlier you must define them in the table. When you edit field rules from the set, you're really editing them in each table, separately. This means that in a child table the field rule editor does not know about the links to the parent table.

              Once your database is zipped you can attach it to a reply here. I use the quick reply link, and then click the "go advanced" button. This leads to a page where I can continue editing my message, while additonal options are presented below the text editor, including one to attach files (Manage Attachments).

              what files do I send is a common question. For beginners it's best to send everything. You may want to copy your database to a temporary folder, open it there, and then delete most of the data. Don't delete it all or we won't be able to use it easily. Remember that what you post here is public, so if privacy is an issue edit your data to remove or scramble things you would not want others to see.

              -- tom

              Comment


                #8
                [ATTACH]11622[/ATTACH]

                Comment


                  #9
                  Dick,

                  I took a look at your database. Here are some suggestions and ideas for you.

                  1) Rename your set. Windows is very particular about names. It's important to use unique names for the different components of your database. Here you have both a table and a set with the same name.

                  2) Your set consists of a parent table, and three child tables each of which has a one to one link to the parent. You're trying to establish default field values for the billing and contact children, using the Shipping table as source for a lookup() or lookupc() default field value expression. I recommend against this approach. Field rules should be developed that will work for the table regardless of the context in which records are being entered or edited. If you eventually succeed in developing your approach it will only work if data entry will ALWAYS occur through your set, and then only if the user supplies the Shipping record first. A better approach would be to remove the default value field rules, and put a button on your data entry form. The button would simply copy (assign) the shipping field values to the Billing fields. An example of this is found in the Customer Information form in the AlphaSports sample database (though it uses a checkbox instead of a button).

                  I'll continue monitoring this thread to see if others different or better ideas for you.

                  -- tom

                  Comment

                  Working...
                  X