Alpha Video Training
Results 1 to 4 of 4

Thread: Calculate Button or Submit Button???

  1. #1
    Member
    Real Name
    E. Z. Rider
    Join Date
    Jul 2008
    Posts
    123

    Default Calculate Button or Submit Button???

    I've been building some dialogs, where you enter a bunch of values and then the dialog calculates your risk of getting some dread disease. I've found that, if the calculation is a simple expression (a formula), it can be placed in the Field Calculation property of the target control.

    If it is more complicated and requires a program, I've been putting the calculations in the "On Click" event of a "Calculate" Advanced Button or in the "After Validate" event of the form, which requires pressing the "Submit" button.

    QUESTION: Which placement of the event code is preferable? For what reasons?

    I know that AJAX is another option, but this is my first Alpha app, and I'm not yet fluent in all the languages. Where would the AJAX code go?

    Thanx,
    EZR

  2. #2
    Member
    Real Name
    Daniel Kolbach
    Join Date
    Jun 2008
    Location
    New Jersey, USA
    Posts
    64

    Default Re: Calculate Button or Submit Button???

    E.Z. I built a dialog which had to calculate dates depending on some parameters. My solution was to add a button (advancebutton) on which i placed all my calculations. I'll work on the suggestions that i got on this forum and try to use Javascript to do that but in the mean time the application is working.

    Here is the link: http://msgboard.alphasoftware.com/al...ad.php?t=74444
    Last edited by dkolbach; 08-22-2008 at 08:30 AM. Reason: Adding Link

  3. #3
    Member
    Real Name
    E. Z. Rider
    Join Date
    Jul 2008
    Posts
    123

    Default Re: Calculate Button or Submit Button???

    I've discovered, that validation does NOT take place when I push the "Calculate" AdvancedButton, so, I would have to write all my own validations, for required fields, before doing calculations.

    I moved my event code to the "AfterValidate" event, and now, when I push "Submit", the validations, selected in each control's menu, get done first.

    This may seem obvious to you experienced people, but I'm new to Alpha5, so it's an epiphany for me.

    Someday I'll be the one giving advice on this forum...
    Meanwhile, I very much appreciate everyone's help and tolerance of my ignorance.
    Last edited by Easy Rider; 08-22-2008 at 11:38 AM. Reason: grammar

  4. #4
    "Certified" Alphaholic NoeticCC's Avatar
    Real Name
    Andrea Gill
    Join Date
    Nov 2007
    Location
    Golcar, West Yorkshire, UK
    Posts
    2,070

    Default Re: Calculate Button or Submit Button???

    Quote Originally Posted by Easy Rider View Post
    I've discovered, that validation does NOT take place when I push the "Calculate" AdvancedButton.
    Nope, validation occurs only when you submit... :)

    And yes it is a small step from seeking to giving advice!

Similar Threads

  1. Where's the submit button?
    By drgarytraub in forum Application Server Version 8
    Replies: 4
    Last Post: 10-23-2011, 10:34 PM
  2. Submit Button
    By ADREYES in forum Archived Wishlist
    Replies: 0
    Last Post: 10-03-2007, 01:36 PM
  3. Submit button
    By Dan Blank in forum Application Server Version 8
    Replies: 3
    Last Post: 05-17-2007, 04:31 AM
  4. Submit Button
    By johnm in forum Web Application Server v7
    Replies: 5
    Last Post: 04-09-2007, 08:13 AM
  5. Submit Button Location
    By Phil Rolf in forum Web Application Server v7
    Replies: 0
    Last Post: 07-09-2006, 09:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •