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

Reset parts of a dialog

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

    Reset parts of a dialog

    Hi
    Have a dialog. Is it possible to reset parts of it, or is the reset function all or nothing?

    The dialog asks about different respiratory impairments, say asthma, sleep apnea and bronchitis. I have experimented with creating a separate dialog for each impairment but seems it works more closely to the effect I need if they are all in one. Each impairment in this dialog sits in its own tab pane. At the top of the page are a series of yes / no radio buttons, asking if the person has ever had the various impairments. The yes / no questions are a business requirement. A yes opens the reflex questions for that impairment. Have used lots of Show / Hide expressions.

    The challenge is when a person ticks yes to say both asthma and apnea, answers all the questions but then changes his mind and turns the asthma button to no.
    If this happens then I need to delete the responses in the asthma questions. If I use the form reset function it removes the answers in all the impairments. So guess what I'm looking for is a slick method to remove all answers that fall inside a particular tab pane.

    I can code a delete for each reflex question individually

    var hasAsthma = {dialog.Object}.getValue('ASTHMA');
    if (hasAsthma == 'No') {
    {dialog.Object}.setValue('AsthmaFirst', '');
    }

    but was wondering whether there is a quicker way
    Is this possible?

    Thank you
    Last edited by hangbill; 11-14-2014, 08:24 AM.

    #2
    Re: Reset parts of a dialog

    but then changes his mind
    looks like you are still stuck in this topic,
    the above scenario, I remember too well and I showed how to manage it in one of your older post.
    I will search and give you the link.
    it is not that difficult. your onChange event should include both conditions
    like
    yes -> do something
    no -> do something else.

    here is the link
    http://msgboard.alphasoftware.com/al...-(web-project)
    post #3
    Last edited by GGandhi; 11-14-2014, 09:29 AM.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    [email protected]
    Skype:[email protected]
    1 914 924 5171

    Comment


      #3
      Re: Reset parts of a dialog

      Thanks Gandhi

      I have it working, in the OnChange event of Asthma which is a yes / no radio button

      if ('No' == hasAsthma) {
      {dialog.Object}.setValue('asthmaFirst', '');
      {dialog.Object}.setValue('asthmaLast', '');
      {dialog.Object}.setValue('asthmaFrequency', '');
      {dialog.Object}.setValue('asthmaHospitalized', '');
      {dialog.Object}.setValue('asthmaWhenHospitalized', '');
      {dialog.Object}.setValue('asthmaHospitalDetails', '');
      {dialog.Object}.setValue('asthmaMedication', '');
      etc
      }

      But I was wondering whether there is a better way to achieve this. I cannot use the resetForm method because I do not want to reset the whole form.

      The form is divided into different containers and tabpanes. Is there anyway to identify the dropdowns and text areas that lie inside a container and give just one delete instruction instead of doing setValue on each one individually

      Comment


        #4
        Re: Reset parts of a dialog

        might think this is crazy idea, but you asked for it.

        imagine you have 4 master fields and varying 100 fields and they are grouped in 10 x 10 fields, then you create 10 different dialogs for each of the 10 fields except the master fields. so you end up 1 master dialog and then 10 other dialogs.
        in the master dialog insert these 10 dialogs. call each one with a unique alias.
        then when the condition changes I am sure you can act on the embedded dialog as a whole
        using a command similar to this one.

        Code:
        var asthma = {dialog.Object}.getValue('ASTHMA');
        if (asthma == 'No') {
        {dialog.EmbeddedDialog_EMBEDDLG1}.resetForm();
        
        }
        where EMBEDDLG1 will be alias for the first one then you can change the number to the next one.
        see if this works. still you have to deal with the pesky, do you want to reset form for that dialog.
        thanks for reading

        gandhi

        version 11 3381 - 4096
        mysql backend
        http://www.alphawebprogramming.blogspot.com
        [email protected]
        Skype:[email protected]
        1 914 924 5171

        Comment


          #5
          Re: Reset parts of a dialog

          Think the reset form messg (if that's what you mean) can be solved with the 'false' parameter, ie resetForm(false)

          Was not aware you can embed dialogs in other dialogs, so this sounds like a solution. Have just seen it, called [Embedded Object] in Other Controls.
          Brilliant, thanks Gandhi

          Comment


            #6
            Re: Reset parts of a dialog

            Have got the embedded dialogs to work, but not the reset.

            The master dialog has only one control, static text . It asks about different respiratory conditions.
            There is one embedded dialog for each respiratory condition, eg one for asthma and another for apnea.

            The asthma and apnea dialogs starts with a yes / no radio button. If yes, then a whole bunch of reflex questions are asked for that condition. If no then nothing happens.

            I have put the following code into the OnChange event of the yes/ no radio button in the asthma dialog.

            var asthma = {dialog.Object}.getValue('ASTHMA');
            if (asthma == 'No') {
            {dialog.EmbeddedDialog_asthma}.resetForm();
            }

            In the master dialog, have given the embedded asthma object an alias of 'asthma'.
            Am not getting any error messgs but form does not reset. Wonder if it is in the line {dialog.EmbeddedDialog_asthma}.resetForm();
            Thanks

            Comment


              #7
              Re: Reset parts of a dialog

              http://screencast.com/t/46LLzD8el
              thanks for reading

              gandhi

              version 11 3381 - 4096
              mysql backend
              http://www.alphawebprogramming.blogspot.com
              [email protected]
              Skype:[email protected]
              1 914 924 5171

              Comment


                #8
                Re: Reset parts of a dialog

                Thanks for this Gandhi.
                Your interpretation is correct. I had the yes / no radio buttons on the asthma and apnea dialog, not on the master dialog. Also did not have a frame around the embedded dialogs so was not able to do the client side show/hide.
                Your screencast helped a lot.

                I still have a problem in that when the form initially opens the radio buttons are not ticked. Then if I tick asthma yes, the form opens and there are values in the dropdowns. If then click No the form closes and then tick Yes and the form opens with no values. So it is working, just trying to figure out why the initial Yes choice opens the form with values.... maybe corrupted.. been trying for hours to figure it out.

                Another thing I noticed (I think) is that it seems the alias name for the embedded asthma component works when I use some random word, like xxxxx, but does not work when I have the word asthma in it. Have not figured this out yet but your EMBEDDLG1 etc seems to work well.

                Thanks for the help, got new insights into embedded dialogs..very helpful

                Comment


                  #9
                  Re: Reset parts of a dialog

                  initial Yes choice opens the form with values.... maybe corrupted..
                  may be not, show a video so that to know what is happening.
                  the naming is not going to be anything special.
                  thanks for reading

                  gandhi

                  version 11 3381 - 4096
                  mysql backend
                  http://www.alphawebprogramming.blogspot.com
                  [email protected]
                  Skype:[email protected]
                  1 914 924 5171

                  Comment


                    #10
                    Re: Reset parts of a dialog

                    whatever you do
                    do not uninstall your alpha.
                    show what you have what you need.
                    thanks for reading

                    gandhi

                    version 11 3381 - 4096
                    mysql backend
                    http://www.alphawebprogramming.blogspot.com
                    [email protected]
                    Skype:[email protected]
                    1 914 924 5171

                    Comment


                      #11
                      Re: Reset parts of a dialog

                      Thanks Gandhi, here is a screencast.
                      http://screencast.com/t/UhDPYY9dEd

                      Comment


                        #12
                        Re: Reset parts of a dialog

                        looks like everything is done properly,
                        1> the dialog seems to remember from the past and pushes the value to the child dialog. I would do the preview button that is left of the live preview and let it run till it finishes then do the live preview see if that fixes, if not just publish to local webroot and check.
                        2> the working preview is not working, may be because you are in internet explorer 11 so just use the live preview.
                        I will study you video tomorrow and let you know if I spot something.
                        thanks for reading

                        gandhi

                        version 11 3381 - 4096
                        mysql backend
                        http://www.alphawebprogramming.blogspot.com
                        [email protected]
                        Skype:[email protected]
                        1 914 924 5171

                        Comment


                          #13
                          Re: Reset parts of a dialog

                          also run a full preview not fast preview at least once more to eject anything cached in it.
                          fast preview reuse the previous values. not the full preview.
                          thanks for reading

                          gandhi

                          version 11 3381 - 4096
                          mysql backend
                          http://www.alphawebprogramming.blogspot.com
                          [email protected]
                          Skype:[email protected]
                          1 914 924 5171

                          Comment


                            #14
                            Re: Reset parts of a dialog

                            okay,

                            I have reconstructed the dialog to reflect what you have.
                            I cannot duplicate what you get. mine works normal.
                            so just go back do preview (not live, not working) in all the components,
                            then try.
                            thanks for reading

                            gandhi

                            version 11 3381 - 4096
                            mysql backend
                            http://www.alphawebprogramming.blogspot.com
                            [email protected]
                            Skype:[email protected]
                            1 914 924 5171

                            Comment


                              #15
                              Re: Reset parts of a dialog

                              http://screencast.com/t/d8fhq0pZ
                              thanks for reading

                              gandhi

                              version 11 3381 - 4096
                              mysql backend
                              http://www.alphawebprogramming.blogspot.com
                              [email protected]
                              Skype:[email protected]
                              1 914 924 5171

                              Comment

                              Working...
                              X