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

Help - Validation/Field rules

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

    Help - Validation/Field rules

    I was someone could help me out as this is driving crazy.

    If memory serves me correctly in A4 I could have a field rule applied to 1 set, but in another set it would not be set.

    In A5 once a field rule is set on a field it permeates all sets that contain the table. Here is where my problem lies.

    I have a customer table that is in a customer set that also contains a contract database linked by customer number. When I try to set a validation rule for any contract entered must require the contract number be filled, when viewing or entering a record in my inventory database (I have a browse that lists any contracts that an inventory item is part of) and there are no contracts on an inventory item the system yells at me that the contract number field is required even though this form is based on an inventory1 set.

    Same thing happens with my service ticket database when no service tickets exist for an inventory item yet.

    Any help would be greatly appreciated.

    Thanks,

    Travis

    #2
    Re: Help - Validation/Field rules

    You might want to consider having form level validation rather than table level validation. IOW you can code the candepart event for a field on a form and deny exiting the field until the field is filled or you could delete the current record if the user chooses not to proceed.
    There can be only one.

    Comment


      #3
      Re: Help - Validation/Field rules

      Thank you for your help.

      Could you help me with setting up the form validation? Is this done with Xbasic? If so I am not advanced enough to write the proper code to accomplish the task at hand.

      Thanks again.

      Comment


        #4
        Re: Help - Validation/Field rules

        Originally posted by Playball335
        Thank you for your help.

        Could you help me with setting up the form validation? Is this done with Xbasic? If so I am not advanced enough to write the proper code to accomplish the task at hand.

        Thanks again.
        Shouldn't be difficult, though it is xbasic, if you know what you want.

        Maybe even easier than my previous suggestion might be to code the form cansave event. Can you outline the possibilities that would occur during data entry?
        There can be only one.

        Comment


          #5
          Re: Help - Validation/Field rules

          The validation I need in this case would be that the "Ticket Number" field must be 9 digits, no more, no less.

          The other validation I was looking for in the contract entry form is that the contract number be required.

          Thanks,

          Travis

          Comment


            #6
            Re: Help - Validation/Field rules

            Originally posted by Playball335
            The validation I need in this case would be that the "Ticket Number" field must be 9 digits, no more, no less.

            The other validation I was looking for in the contract entry form is that the contract number be required.

            Thanks,

            Travis
            there are other considerations but here is an example of what you requested.
            There can be only one.

            Comment


              #7
              Re: Help - Validation/Field rules

              Thanks Stan, it works like a charm. :)

              However, I am trying to use the same method for a field in a tabbed form browse and it works until I try to leave the tabbed form browse then reports and error, after I click ok everything is fine. Should I add a statement when working within a tabbed form browse.
              Last edited by Playball335; 08-07-2006, 01:56 PM.

              Comment


                #8
                Re: Help - Validation/Field rules

                Stan,

                Still having trouble with error reporting that the field does not exist.

                Let me explain the scenario of how the form is set up.

                The form is based on a workorders set that has a work orders parent and a child of assigned tickets.

                The form itself contains work order detail, but on a tabbed form has a browse to easily add/delete tickets as engineers complete jobs against said work orders.

                My problem is that I need to make sure that..

                a) Users are required to enter a 9 digit ticket number
                b) That when finished entering a ticket and a user clicks to another record the browse doesn't add a new record inadvertently to the assigned tickets database because the cursor was left in the browse.

                Thanks again.

                Comment


                  #9
                  Re: Help - Validation/Field rules

                  Originally posted by Playball335
                  Thanks Stan, it works like a charm. :)

                  However, I am trying to use the same method for a field in a tabbed form browse and it works until I try to leave the tabbed form browse then reports and error, after I click ok everything is fine. Should I add a statement when working within a tabbed form browse.
                  "works until I try to leave the tabbed form browse then reports and error" - and what might that error be?

                  I'm not at all certain what a "tabbed form browse" is. There are tabbed objects, which may contain browses. When you reference a field in a browse you must include the "path" that would tell Alpha how to find it. Something like

                  Main:browse1:tick_num.value

                  additionally there is no candepart event for a field in a browse so you have to settle for the candepart event of the browse itself, validate the values, and send the user back to the appropriate fields as necessary.

                  Something like

                  Code:
                  if len(alltrim(Main:browse1:tick_num.value))<> 9
                  	cancel()
                  	ui_msg_box("Sorry","Must be exactly 9 digits.")
                          Main:browse1:tick_num.activate()
                  end if
                  There can be only one.

                  Comment


                    #10
                    Re: Help - Validation/Field rules

                    I'm sorry, I am referring to a browse found on a tab.

                    The error I receive is that it cannot find the ticket_no field.

                    The "Main:" portion of your code, does that refer to the form name or the table the field is found in?

                    After trying your latest code, here is the error I receive.

                    Script:: Work_Order_Entry:TICKENT.CanDepart Line:5
                    if len(alltrim(Work_Order_Entry:TICKENT:ticket_no.value))<> 9
                    not found

                    Work_Order_Entry:TICKENT:ticket_no not found

                    Comment


                      #11
                      Re: Help - Validation/Field rules

                      Originally posted by Playball335
                      I'm sorry, I am referring to a browse found on a tab.

                      The error I receive is that it cannot find the ticket_no field.

                      The "Main:" portion of your code, does that refer to the form name or the table the field is found in?

                      After trying your latest code, here is the error I receive.

                      Script:: Work_Order_Entry:TICKENT.CanDepart Line:5
                      if len(alltrim(Work_Order_Entry:TICKENT:ticket_no.value))<> 9
                      not found

                      Work_Order_Entry:TICKENT:ticket_no not found
                      Main is the name of my form. What is TICKENT in your form?
                      Right click on the browse on the tab and check its properties, object name. Probably will be browse1 unless you changed it or have more than one.
                      There can be only one.

                      Comment


                        #12
                        Re: Help - Validation/Field rules

                        Travis

                        You may find some help with the naming by using the object explorer.

                        In design mode - view - object explorer
                        Al Buchholz
                        Bookwood Systems, LTD
                        Weekly QReportBuilder Webinars Thursday 1 pm CST

                        Occam's Razor - KISS
                        Normalize till it hurts - De-normalize till it works.
                        Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                        When we triage a problem it is much easier to read sample systems than to read a mind.
                        "Make it as simple as possible, but not simpler."
                        Albert Einstein

                        http://www.iadn.com/images/media/iadn_member.png

                        Comment


                          #13
                          Re: Help - Validation/Field rules

                          Originally posted by Stan Mathews
                          Main is the name of my form. What is TICKENT in your form?
                          Right click on the browse on the tab and check its properties, object name. Probably will be browse1 unless you changed it or have more than one.
                          TICKENT is the name of the browse.

                          Comment


                            #14
                            Re: Help - Validation/Field rules

                            Here is a screenshot of the form/browse along with the explorer detail.

                            Comment


                              #15
                              Re: Help - Validation/Field rules

                              Originally posted by Playball335
                              Here is a screenshot of the form/browse along with the explorer detail.
                              I think the picture shows that the line should be

                              Work_Order_Entry:TICKENT:ticket_no_.value

                              At least that (ticket_no_) is the way the object name appears there.
                              There can be only one.

                              Comment

                              Working...
                              X