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

Close Open a Form

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

    Close Open a Form

    Very long story short, Anyone know of a way to close and then re-open the same form using a button on it?

    All the scripts I create stop running as soon as the form is closed.
    Prefer Action scripting, but anything would be greatly appreciated.
    Thanks, Barry

    #2
    Barry,

    This is possible, but to what purpose? What are you trying to achieve as there may be better alternatives.

    Comment


      #3
      Have a pay Bills form with one to one relation between "bills" and "checks". I tick a check box on each bill to be paid. Pressing the pay bills button, executes a script that goes out to checks, creates a check and fills a variable with the check# then returns, then the check# is then added to each bill that was check marked.

      We would normally now add the desired amounts to the bills with matching check#'s we want to pay and this amount gets posted to the checks total amount via field rules.

      Here's the problem, the above works perfectly .but ...... the only way the posting rule will works is if I exit the form and return, then fill the amounts.
      If I don't exit the form and return, the posting will not take place.

      I'm guessing it updates the relation or link between Bills and Checks?
      Thus the need to exit the form and return. OR... is there a way to refresh the link between them at that point? I've tried every refresh I could find.

      I know, should have checks as parent, but here's where the really long story takes place and would turn into a novel.
      Thanks

      Comment


        #4
        Hi Barry,
        "I tick a check box on each bill to be paid"
        This sounds like you are working in an embedded browse showing multiple records for the bills.dbf.

        ..goes out to checks, creates a check and fills a variable with the check# then returns, then the check# is then added to each bill
        This seems like a loop somehow. Not clear how this happens.

        this amount gets posted to the checks total amount via field rules.
        This makes no sense whatsoever.

        A check is a an amount. When the check is created it would be correct to enter the check amount to the check record. The step of
        amount gets posted to the checks total amount via field rules
        make no sense to me whatsoever.

        So it's hard to help when something within your process is funky.
        Mike W
        __________________________
        "I rebel in at least small things to express to the world that I have not completely surrendered"

        Comment


          #5
          I get what you are doing, I do a similar process posing items to a budget in a Council Finance application.

          You may have to take the process outside of the form.
          The attached app makes use of the Menu function. There is only one option displayed, but it does what you want.
          Open the Form and click on the CloseOpen menu button - top left - to see it work.

          Menu.zip
          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


            #6
            Thank you for the replies!
            Mike, the check amount is un-known until all the desired bills to be paid are selected.
            Ted, neat trick, but hoping to automate.

            I've attached a stripped down version, encase somebody has time to look.

            Comment


              #7
              Doesn't help.
              To explore your reasoning we would need the forms and set structure - if any - together with the scripts.
              Are you able to sanitise or anonymise a version and upload it?

              Posting should be possible - at least in my apps it works and refreshes the data with no problem.
              My suggestion would allow you to get it working with minimal rewrite of your existing design.

              Mike is spot on as we are guessing how your app has been designed.

              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


                #8
                Sorry Ted, was my 1st time trying to upload to the forum. The files were in the original folder, but the scripts and others apparently got stripped out? Maybe this is what you mean by sanitize? Can you explain how to accomplish? I can find nothing in the forums on this.

                The form is cool, you can check box as many bills you want to pay for a vendor at one time and it will issue the check number to all check marked, then you enter the amount to pay against each. This populates the check amount as you go, But again only works if you close and reopen the form.

                This is why I started off with very long story short. Just looking to close and re-open with a button on the form it's self. I should then be able to incorporate into the script.
                Thanks so much

                Comment


                  #9
                  By sanitize, I mean strip anything you don't want to be seen right out.
                  When you upload an app, you need to close all windows and zip it from the Control Panel.
                  Then, upload the zipped app.
                  I didn't get any forms with the last upload and no .adb file.

                  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


                    #10
                    I reviewed your zip files and did not know what you want to do.

                    if your plan is
                    you can check box as many bills you want to pay for a vendor at one time and it will issue the check number to all check marked, then you enter the amount to pay against each. This populates the check amount as you go
                    I think You may have to restructure the tables, such as "one to many". Parent table have a field for vendor to pay, pay date as new entry. child table has the bill lists which are not paid yet that coming from other tables(Purchase Orders ) by selected vendor at parent table. can be creatable by import operation. After you click on a button, pay it, then write and print a check. after printed a check you can import the check number from "check" tables or lookup() or create a history Set tables.

                    you need to know the keep same name, type and size of the "Primary key " from parent and "foreign key" from child table. A5 may not confusing about the Link name but human will do.


                    If you do well for the structure of set/tables, you do not have to close a form and open it again.

                    Comment


                      #11
                      Not sure why the zip didn't come over complete? Trying again. Thank you!

                      Comment


                        #12
                        Modeling is very important task when you work with "database". I think the Layout is not enough to build the "Auto - Payment" system.
                        Your job will be a lots easier when you have a good Modeling.


                        from your form.

                        * there seams to be no way to update the set and have it show in the checks browse with out exiting the form then returning.

                        3.) Should be able to enter an amount in AMT_PAID field of Bills and it should update AMOUNT in Checks per the posting rules in Bills AMT_PAID.
                        1) there seams to be no way to update the set-- records are already saved without closing a form unless it has some problems.
                        2) have it show in the checks browse with out exiting the form then returning. -- Add "Show All Records" and "Sort" with ActionScripts -- test it with a new button.
                        3) Should be able to enter an amount in AMT_PAID field of Bills and it should update AMOUNT in Checks per the posting rules in Bills AMT_PAID.
                        --
                        -- The posting rule Will not work with your button codes. because table.open("table_name") function does not honor the field rules. see help more detail. You may using "Table events" or coding the action with xBasic or some operation function.

                        Comment


                          #13
                          I do a lot of my programming without proper prior planning, and figure things out as I go.
                          With that said, I need to ask if the intent is to pay the entire bill amount if the amount paid is blank,
                          or if the user needs to provide the amount paid? Also, if only a partial amount paid, would that bill
                          then become eligible for future payments ? Last, but not least, do you want to prevent paying more
                          than the amount due ?
                          Gregg
                          https://paiza.io is a great site to test and share sql code

                          Comment


                            #14
                            Thanks for the suggestions.
                            Regarding,
                            1.) Agreed.
                            2.) If you do steps 1 & 2 and save, find, sort or query on chk_stc table will not find the newly created record in chk_stc.
                            If you exit the form and return, sort, find and query work perfectly.
                            This to me shows Alpha doesn't recognize a link between chk_stc and the bills tables, until you exit.
                            Needs to be a set refresh action or something??

                            3.) Agreed, I think, by the time your to the point of entering amounts, the scripts with-in the button have completed. or maybe I'm not understanding. There is a table open, but followed by table close later.

                            dim tbl as p
                            tbl = table.open("chk_stc",FILE_RW_SHARED)
                            tbl.enter_begin()
                            tbl.PAY_TO = convert_type(sup_num,"Numeric")
                            tbl.DATE = convert_type(Chek_date,"Date")
                            tbl.BANK2 = "SCB"
                            tbl.NAME = a5_eval_expression("=Sup_Name",local_variables())
                            tbl.CAT = a5_eval_expression("=Vendors->Catogory",local_variables())
                            tbl.LINK = 1
                            tbl.enter_end(.t.)
                            tbl.close()


                            Thanks again

                            Comment


                              #15
                              If you have an Index with Unique Only, you will have this issue.
                              You have multiple occurrences of Unique items in various Indices.
                              Try removing the constraint and see what happens.
                              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