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

Clearing form fields

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

    Clearing form fields

    I've been away from A5 for a few months; nice to see the familiar names still here, hope you're all well. A simple problem, I hope:

    On the press of a button I want to clear the contents of some fields from a form. I have the xbasic code

    lastname.value=""

    etc., attached to the button, which seems to work ok. Except for two fields. Whatever I do, these fields stubbornly remain set to their previous values. I can't see any particular difference in the nature, rules, etc., of these fields. I have even built in a check immediately after the relevent line, eg:

    gcode.value=""
    ui_msg_box("TEST",gcode.value)

    and it shows the previous value. This is really holding up progress on the job. Any ideas what may be causing this? I've also tried gcode.text (instead of value) but this doesn't work either.

    Thanks,

    Martin.

    #2
    RE: Clearing form fields

    Are the fields part of the set linkage?
    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


      #3
      RE: Clearing form fields

      Yes.

      Comment


        #4
        RE: Clearing form fields

        I'm not sure what you are trying to do at the application level. Knowing might help formulate a solution.

        I do think that the child fields of a linkage should not be changed and apparently can't. Otherwise widows and orphans would be all over the place.

        We (speaking for the forum) will surely try to help where we can!
        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


          #5
          RE: Clearing form fields

          Martin, if they're part of the definition of your set linkage, then you'll probably have to edit the link field values using a form based on the table, and not on the set. If you are working with a table that is primary in one or more sets, and if you change the link field value while working outside the set, you immediately 'orphan' all the child table records that were previously linked. The same thing will happen if you edit the link field value in the primary table while working in a form based on the set unless you have cascade changes enabled in the definition of the set.

          The converse is true if you edit link field values in the child table, outside the set. When you change the link field like that you risk inserting a new link field value which inadvertantly links the record to an unexpected primary table record. This will happen if you choose a new link field value that is already in use in the primary table.

          My advice to anyone who is editing set link field values is 'proceed with caution'.

          -- tom

          Comment


            #6
            RE: Clearing form fields

            Thanks Tom and Al,

            In in the set I have a one-to-one link of two tables (actually there are more tables involved but I'm trying to restrict the description relevent to my problem).

            I am using a tabbed form. Within one tab is some general order-type information. Another tab shows the customer. There is only one customer per order. The customer details are input via the customer tab. Usually, the customer is new, and all his details have to be input. An xbasic function then computes a Customer Code, based on his Lastname, Firstname, and existing codes. This seems to work OK. The Custoemr Code than links to a code held on the Order table. About a third of the time the customer is an existing customer, so is selected from a drop down box, accessed via the Customer Code field on the form. All this seems OK. Very, very occasionally, due to a mistake by the operator, it is possible that an existing customer will have been specified on an order, whereas, in fact, the customer is new. In the unlikely event that this happens, the operator needs to remove the existing link to the existing customer, and input a new customer. All I want to do is have a button on the customer tab ("New Customer"), which, when pressed, clears the current customer details from the form and allows the creation and input of a new customer's details.

            I've done this by attaching code to the button which clears all the relevent fields (lastname.value="" , etc.). By setting a variable the application knows, when the whole order is saved, to create a new customer record in the customer table, calculate a code for the customer, and link it to the order.

            I'm sure you're right that it's to do with the fact that it's the customer Code which is linked to the Order table.

            Any ideas how I might get over this? Many thanks for anything.

            Martin.

            I've got this to work, mostly, but, although all other fields clear on the lastname.value="" instruction, the customer code (gcode.vale="") refuses to. (I have to disable the field after clearing it because the user doesn't input the code, it's calculated by the system).
            this happens

            Comment


              #7
              RE: Clearing form fields

              Sorry previous message sent before tidying up. This is how it SHOULD have read:

              Thanks Tom and Al,

              In in the set I have a one-to-one link of two tables (actually there are more tables involved but I'm trying to restrict the description relevent to my problem).

              I am using a tabbed form. Within one tab is some general order-type information. Another tab shows the customer. There is only one customer per order. The customer details are input via the customer tab. Usually, the customer is new, and all his details have to be input. On saving the whole order, an xbasic function computes a Customer Code, based on his Lastname, Firstname, and existing codes. The Customer Code then links to a code held on the Order table.

              About a third of the time the customer is an existing customer, so is selected from a drop down box, accessed via the Customer Code field on the Customer tab part of the form. Very, very occasionally, due to a mistake by the operator, it is possible that an existing customer will have been specified on an order, whereas, in fact, the customer is new. In the unlikely event that this happens, the operator needs to remove the existing link to the existing customer, and input a new customer. All I want to do is have a button on the customer tab ("New Customer"), which, when pressed, clears the current customer details from the form and allows the creation and input of a new customer's details.

              I've done this by attaching code to the button which clears all the relevent fields (lastname.value="" , etc.). However, although all other fields clear on the objectname.value="" instruction, the customer code (gcode.vale="") refuses to. (I have to disable the field after clearing it because the user doesn't input the code, it's calculated by the system).

              I'm sure you're right that it's to do with the fact that it's the customer Code which is linked to the Order table.

              Any ideas how I might get over this? Many thanks for anything.

              Martin.

              Comment


                #8
                RE: Clearing form fields

                Martin, instead of trying to break the linkage in the current child table record, using a form based on the set, I'd have such a button popup a separate form, based solely on the child table. The edit to the link field can occur there and be saved. On return to the original set based form, the form should be resynched. The edited child table record should be gone (having been linked to another parent record by the edits on the second form). By design, set based forms in Alpha Five try very, very hard to prevent the user from being able to disturb the linkages at the child table level.

                -- tom

                Comment


                  #9
                  RE: Clearing form fields

                  Thanks Tom, yes, I see what you mean. In fact, at first, I had a lookup table, which, if the record couldn't be found, allowed the creation of a new record. But my client said why should he have to get used to two forms, particularly as, in most cases, he would be going to the lookup, then straight on to a different form (as most customers are one-offs), then back to the lookup, etc., whereas he could simply input onto the first form. And I couldn't really disagree with him.

                  I'll think about it over Christmas. I don't know if it's too early but, if you celebrate such things (I don't mean to be presumptious about your background/culture), have a good time and happy new year, etc.

                  And thanks to you and Al and everyone for all the help!

                  Martin.

                  Comment

                  Working...
                  X