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

Web application help

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

    Web application help

    Hi

    I am new to Alpha five and am busy creating a database solution for a client.

    The "application" has a step by step process of taking details from the user and inputing it into the database/table. Now how do I get a step by step process working with populating one table.

    eg.

    Table contains these fields:
    -name
    -surname
    -DOB
    -Address
    -childs name
    -childs age
    -school or nursery
    -sport

    Now the two steps need to be as follows:
    Page 1: enter persons details (name, surname, DOB, address)
    Page 2: Enter child's details (childs name, childs dob, school or nursery, sport)

    after clicking submit on page two it needs to populate the table with the two page's details as one record.

    There is a good reason for the stepped process so can't look at seperating the tables.

    Can anyone give me a rough idea of what is needed code wise, etc?

    Thanks
    Dylan

    #2
    Re: Web application help

    I just walked someone else through this, so here is what I said:

    for a two page input process you need one dialog and two Grids, each on separate A5W pages. And probably a final page saying Thanks.

    First page has a dialog with one purpose, to create a new table record and establish the "survey id". The survey id is the unique value for this survey and allows grid 1 and 2 to point to the correct record.

    You need to add a 32 character field to your table named ID.

    The dialog needs at least one field, so you might ask their name. Then in AfterValidate you have:

    dim tbl as p
    tbl=table.open("[PathAlias.ADB_Path]\mytable")
    tbl.enter_begin()
    tbl.id = remspecial(api_uuidcreate())
    tbl.name = currentform.controls.name.value
    tbl.enter_end()
    session.__protected__surveyid= tbl.id
    tbl.close()
    currentform.redirecttable="mypage1.a5w" ' page with the first grid

    That creates a record and puts the unique id in a session var and sends them to the next page with the first grid.

    On both grids, filter them to show only that one record based on session variable.

    On each grid, use the Target in Properties to send them the 'next' page after each Submit.

    When they complete the last page, they are done. To complete the process, you do need code to ensure they don't answer the same survey a second time, if that is important.
    Steve Wood
    See my profile on IADN

    Comment


      #3
      Re: Web application help

      Originally posted by Steve Wood View Post
      I just walked someone else through this, so here is what I said:

      for a two page input process you need one dialog and two Grids, each on separate A5W pages. And probably a final page saying Thanks.

      First page has a dialog with one purpose, to create a new table record and establish the "survey id". The survey id is the unique value for this survey and allows grid 1 and 2 to point to the correct record.

      You need to add a 32 character field to your table named ID.

      The dialog needs at least one field, so you might ask their name. Then in AfterValidate you have:

      dim tbl as p
      tbl=table.open("[PathAlias.ADB_Path]\mytable")
      tbl.enter_begin()
      tbl.id = remspecial(api_uuidcreate())
      tbl.name = currentform.controls.name.value
      tbl.enter_end()
      session.__protected__surveyid= tbl.id
      tbl.close()
      currentform.redirecttable="mypage1.a5w" ' page with the first grid

      That creates a record and puts the unique id in a session var and sends them to the next page with the first grid.

      On both grids, filter them to show only that one record based on session variable.

      On each grid, use the Target in Properties to send them the 'next' page after each Submit.

      When they complete the last page, they are done. To complete the process, you do need code to ensure they don't answer the same survey a second time, if that is important.
      Hi Steve and thanks for the reply

      I do not quite understand as it seems you have given me the exact quote from when you dealt with the other person. So I'm battling to understand how it works.

      Just another note, my step by step process will have more than one page.
      Oh and I don't want any grids to be vsisble.
      Imagine you are registering on a website and you go through a step by step process.....that is what I need but all the details to go into one table as a single record
      Last edited by djtreble; 12-14-2009, 04:03 PM.

      Comment


        #4
        Re: Web application help

        I tailored it to what I thought you needed. Once you run the first step that creates a record, you can have as many steps as you need, following the same method. Which part do you need help understanding? There are other ways to do this, I just happen to like this method.
        Steve Wood
        See my profile on IADN

        Comment


          #5
          Re: Web application help

          Originally posted by Steve Wood View Post
          I tailored it to what I thought you needed. Once you run the first step that creates a record, you can have as many steps as you need, following the same method. Which part do you need help understanding? There are other ways to do this, I just happen to like this method.
          Ok sorry if this is going to seem long winded

          Screen shots to help are included.
          Page 1:


          Select a service, click next. This will create the record with the unique ID automatically (all records will have a unique id) and fill in service_type field.
          So far this is what I have in AfterValidate:
          t = table.open("[pathalias.adb_path]\main")
          t.enter_begin()
          t.Service_type = alltrim(CurrentForm.Controls.Service.value)

          CurrentForm.RedirectTarget = "new_refferal_2.a5w"


          Page 2:


          Enter in the details then click next. This will then populate the record that was created on page 1 with the corresponding fields, then move on to page 3, etc, etc.

          So I need to know what code needs to be in each page's AfterValidate/elsewhere and what code to use on the final page where they will finish populating the new record.

          Comment


            #6
            Re: Web application help

            Sorry, ignore the second "service" field in page 2, that isn't meant to be there

            Comment


              #7
              Re: Web application help

              In my design, the first page is a dialog like you have it, the rest of the pages are grids filtered to show the record created in page one. You can use Dialogs everywhere, but its a pain.

              You left out the later half of the code for dialog 1. On the very last grid you can include a hidden field that flags the survey as done. (Misspelled referral.)
              Steve Wood
              See my profile on IADN

              Comment


                #8
                Re: Web application help

                Originally posted by Steve Wood View Post
                In my design, the first page is a dialog like you have it, the rest of the pages are grids filtered to show the record created in page one. You can use Dialogs everywhere, but its a pain.

                You left out the later half of the code for dialog 1. On the very last grid you can include a hidden field that flags the survey as done. (Misspelled referral.)

                Ah ha.....now I understand how you have yours working

                No I need to make my application fully idiot proof...hence using just the dialogs.

                I can understand it may be a pain but I will go through the pain of making it work as long as the end product is VERY easy to use.

                Can you help?

                Comment


                  #9
                  Re: Web application help

                  Using grids will be just as idiot proof and a lot easier on your part. Using dialogs you have to deal with field types while grids do that internally. With a dialog you have to write 10-30 lines of code per dialog, zero with a grid. You just set your filter on the grid to match the surveyid and to show only one record, only allow update, not insert or delete and turn off a lot of the nifty things that are defaults in a V10 grid, but dont apply to a one-record grid.

                  But if you want to use dialogs you need to know how to open a table, set the primary filter, set the index value, see if there is a matching record, update if so, deal with it if not, close table...
                  Steve Wood
                  See my profile on IADN

                  Comment


                    #10
                    Re: Web application help

                    Originally posted by Steve Wood View Post
                    Using grids will be just as idiot proof and a lot easier on your part. Using dialogs you have to deal with field types while grids do that internally. With a dialog you have to write 10-30 lines of code per dialog, zero with a grid. You just set your filter on the grid to match the surveyid and to show only one record, only allow update, not insert or delete and turn off a lot of the nifty things that are defaults in a V10 grid, but dont apply to a one-record grid.

                    But if you want to use dialogs you need to know how to open a table, set the primary filter, set the index value, see if there is a matching record, update if so, deal with it if not, close table...
                    Ok, I am going to try what you suggest then.

                    Where in the grid in properties is "target"?

                    Also how do you take the session variable to filter the records shown?

                    Comment


                      #11
                      Re: Web application help

                      Using session vars to filter records uses Arguments in the Grid. The Target is under Customization under Update Properties, only visible if you have one or more fields set as updateable.
                      Steve Wood
                      See my profile on IADN

                      Comment


                        #12
                        Re: Web application help

                        Originally posted by Steve Wood View Post
                        Using session vars to filter records uses Arguments in the Grid. The Target is under Customization under Update Properties, only visible if you have one or more fields set as updateable.
                        Brilliant, got it working!

                        How easy was that!!!

                        Thanks alot for your help!

                        Comment


                          #13
                          Re: Web application help

                          To further my application, during the step by step process, I now need to add details to a different table called "child" and use the "session id" created by the dialog on page 1 to populate a field called "cross_ref" in the "child" table before it brings up the grid.

                          So after clicking next on the second page:


                          It will then populate the fields filled there (which it does already) and then populate the field "cross_ref" in the table "child" with the session variable. The reason it needs to do this after the "next" button is it will go to a third page to bring up the "child" grid filtered by the session variable. And it's used to link children's details to a client.

                          Can you help again?

                          Please let me know if you don't understand

                          Comment


                            #14
                            Re: Web application help

                            Also how do i populate a field with the user's name when using grids?
                            I'm using the built in security system of Alpha 5

                            And how do you end a session variable?
                            Last edited by djtreble; 12-16-2009, 03:15 PM.

                            Comment


                              #15
                              Re: Web application help

                              Dylan,

                              It takes a lot of courage to contract with a client to create an application with a product you don't know how to use...

                              If you look in the "Announcements" section of this board, you'll see that Alpha is offering training in February. Day one looks like it would be perfect for you because that stuff is the same for V9 and V10.

                              Otherwise, I think those of us who help out on the board may get tired of writing your application for you (for free).

                              Pat
                              Pat Bremkamp
                              MindKicks Consulting

                              Comment

                              Working...
                              X