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



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

Conditional Cancel in Modal dialog script

  • Filter
  • Time
  • Show
Clear All
new posts

  • MikeC

    Mike, thanks for your time. I did something different than what you had suggested but was able to do so only because of what you had done and said. I couldn't put the opening of the tSel_Vendor on the OnActivate of the tapAdd_Trans form as then it would be opened each and every time I activated it -- which would happen even if I only wanted to change or add something to the tapAdd_Trans form without wanting to change the selected vendor company. But this brought to light the possibility of why my script would not run as it was not being seen by the child form (tapAdd_Trans).
    So this is what I did:

    Everything works now as far as using the cancel button of the tSel_Vendor. On the Cancel button of the tSel_Vendor form I took off all but the cancel changes and close form scripts. On the Insert button of the Transaction form I took off everything from (and including) the script which opens the tSel_Vendor form and added in its place a button.push() script which pushes the tapAdd_Trans button that is located on the upper left side--which opens the tSel_Vendor form modally and has the "set field value" scripts. I used a if company.text = "" script there.

    The Cancel Changes script on the tSel_Vendor Cancel button is needed if I was changing a vendor company in some way or adding another one and then decided not to.

    I attached a modified sample DB with these changes for any who need to see.


    Leave a comment:

  • Mike Wilson
    my2 cents


    Try this, it worked for me but maybe not the completeness of stop gap you desire.

    1. Move the open tSel_vendor as dialog to an OnActivate for tapAdd_Trans. I’m not sure this makes a difference but it ‘childs’ to the form it is being coupled with more linearly…. in my obtuse mind.
    2. There are two In-line Basic scripts on the INSERT button in the Transaction form I would change. The first has the following:
    Inline Basic script1:

    if varP_Object:Company.visible = .F. then
    I would add an Action Script to the Cancel button of the tSel_vendor window that produces a variable to defines the state of the window. I used tSVwindow=”closed”. I then changed your Inline Basic script to:
    if tSVwindow =”closed” then
    3. The Cancel button in the tSel_Vendor form defines variable vcT_curr_company=””. I replaced the second In-Line Basic script in the INSERT Button in the Transaction form so it is:
    if vcT_curr_company=”” then
    4. I am not sure the ‘Cancel Changes’ action in the ‘Cancel Button on the tSel_Vendor form does anything.You decide.

    That’s all I have. Good luck.

    Mike W

    Leave a comment:

  • MikeC
    :-) I just realized that by setting the variable to "" on the cancel button it would also blank out the original vendor(company name) if there was one -- which of course could happen so is not the way to accomplish getting rid of the retained variable value....And now it seems that the variable does not appear to be "retained"----could simply have been a glitch on my end.
    I just tried adding the "button6.push()" which is the Cancel button of the form I wish to close to the Cancel button of the Modal form tSel_Vendor and works...but it presents the errors again, of course, because the script which follows the closing of the Modal dialog has no form open in which to operate. This is why I think that the cancel and closing of the tapAdd_Trans form must be done from the script that runs after closing the Modal form.

    Any clues or different ways to approach this would be great---just don't want to be chasing after a solution in a place that I shouldn't be .


    Leave a comment:

  • MikeC
    started a topic Conditional Cancel in Modal dialog script

    Conditional Cancel in Modal dialog script

    I have 3 forms.
    Transaction----based on trans table
    tapAdd_Trans--based on the set trans_alloc_prod (trans=>allocation_tbl,-> prod tables)>many and one->one
    tSel_Vendor----based on client_info table

    From the Transaction form the Insert button is pushed which brings up both of the other forms---tapAdd_Trans form first and then tSel_Vendor second (in Modal dialog). The tSel_Vendor form is where a company is chosen for a transaction and is placed into the tapAdd_Trans form. So simply, the Transaction form is used to see a general view of transactions. The tapAdd_Trans form shows the details of each transaction. The tSel_Vendor is just a form in which to pick a company that the transaction occurred at.

    Everything works properly except for the following: When the tSel_Vendor
    form is brought up and then cancelled, I want to have the tapAdd_Trans form to close at the same time....and cancel any changes so a blank record isn't saved.
    If I close the tapAdd_Trans form from the "Cancel" button of the tSel_Vendor form I get errors due to the script running from the "Insert" button pressed on the Transaction form that first opened the tSel_Vendor form as a Modal dialog.

    I have been attempting to add a script to the Transaction form's Insert button (after the script that opens the tSel_Vendor form) that would cancel changes and close the tapAdd_Trans form if its Company field is blank. As the variable seems to retain its prior value I have set the variable value to "" when the cancel button is pushed. The simplist way I would think would be to have the script "button6.push()" which is the Cancel button of the tapAdd_Trans form. And would not mind even this work-a-round but cannot even get this to work! I cannot get the script to cancel changes or to close the form tapAdd_Trans and have tried various ways using pointers, actual paths, parentform, topparent, etc but obviously have them incorrect as any one of the methods I have attempted should work. I must be missing something very basic which would not surprise me in the least.
    I have attached a sample database for those who think they may be able to help. The easiest way for navigating is just to choose the aMENU form and it shows the way.