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

List Control Deselect does not clear e.datasubmitted variable

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

    List Control Deselect does not clear e.datasubmitted variable

    Hi Everyone,

    If you have a list control that has multiple selections, you can clear the selections by creating a button with the javascript below:

    var lObj = {dialog.object}.getControl('listcontrol');
    lObj._deselectAll();

    However, if you do an Ajax call back the e.datasubmitted.listcontrol value which contains the keys of selected rows is not cleared. So lets say 10 rows are selected and the user deselects them. A subsequent AJAX call back even when the list is showing as none selected will have the 10 key values.

    How to clear the e.datasubmitted.listcontrol value?

    Alpha has figured this out, if you manually deselect each row the e.datasubmitted value is updated appropriately.

    Thanks,

    Scott

    #2
    Re: List Control Deselect does not clear e.datasubmitted variable

    Confirmed... the list object properties get cleared, but not e.datasubmitted. Hope you don't mind... I sent off the info to Alpha since I had something else as well.

    Confirmed by Alpha as an issue. The workaround is to do this after the ._deselectAll()

    Code:
    {dialog.Object}.setValue('listname',false);
    where false means do not fire the change event.
    Last edited by Davidk; 03-09-2016, 09:38 PM.

    Comment


      #3
      Re: List Control Deselect does not clear e.datasubmitted variable

      I think you need to 3 parameters, if you want to set the flag that turns off firing of the change event.

      {dialog.Object}.setValue('listname',false,false);

      Comment


        #4
        Re: List Control Deselect does not clear e.datasubmitted variable

        Did you try it? This is a List control... so... it's a bit different. Actually... looking at this further, this is no onChange event for a List control. If you find something in the List control is firing without the 3rd parameter, please post back. I can't see anything firing.

        Comment


          #5
          Re: List Control Deselect does not clear e.datasubmitted variable

          David, no I had not tested what I wrote in post # 3. But now I have and here's a UX that demonstrates the difference between including that 3rd parameter to the {dialog.Object}.setValue() function:

          https://drive.google.com/file/d/0BzF...ew?usp=sharing

          Make selections in the LIST using Ctrl-Click and notice the edit box below the list gets updated with the key values of selected items and the 3 edit boxes below get colored green if "C01", "C02" or "P01" are selected. Use the two buttons outlined in red to test with and without using the 3rd parameters to "setValue()".

          Comment


            #6
            Re: List Control Deselect does not clear e.datasubmitted variable

            Rich, I think we're talking about different things. Your 2 buttons both have 3 parameters... one button with true for the 3rd param, one with false.

            I was saying that you don't need the 3rd param in this case. You only need to pass 2 parameters.

            This... will clear the List.
            Code:
            {dialog.Object}.setValue('LIST1',false);
            And thanks for the sample.

            Comment


              #7
              Re: List Control Deselect does not clear e.datasubmitted variable

              I know, I was confusing the issue by writing both calls to setValue with a 3rd parameter of false or true. But, omitting the parameter is the same as including it with the value true!

              The reason I made a post here anyway is because what was written in post # 2 above:
              {dialog.Object}.setValue('listname',false);
              where false means do not fire the change event.
              I was just trying to say that the second parameter in that function call is not what tells the system to not fire a change event. (In LISTS the event is actually, confusingly, called "onSelect"). I was trying to say if you really didn't want the change/onSelect event to fire then it requires a 3rd parameter to that function and it should be set to false.

              I wasn't trying to say the change event "should be" circumvented in this situation. I was just saying if that is what you wanted to do then you'd have to supply a third parameter to that function call.

              My demo component shows a case where calling setValue on a LIST must be allowed to fire the change/onSelect event so other fields can be updated on the UX.

              Comment


                #8
                Re: List Control Deselect does not clear e.datasubmitted variable

                Right... understood. This works as well...

                Code:
                {dialog.Object}.setValue('LIST1',false,false);
                Clear and don't fire List onSelect

                Comment


                  #9
                  Re: List Control Deselect does not clear e.datasubmitted variable

                  Note:

                  If the LIST has a character key instead of a numeric key then the second parameter to setValue should be an empty string if you are trying to clear the selections from the list.

                  {dialog.Object}.setValue('LIST1','');

                  Comment


                    #10
                    Re: List Control Deselect does not clear e.datasubmitted variable

                    Are you saying that with a character key {dialog.Object}.setValue('LIST1',false,false); does not clear the selections? Your example List has a character key.

                    Comment


                      #11
                      Re: List Control Deselect does not clear e.datasubmitted variable

                      right. But just so we don't confuse future readers, let me go back to talking about "{dialog.Object}.setValue('LIST1',false);". In my app the second parameter cannot be false when trying to clear the selections from the list. It doesn't matter if the third parameter is included or not or if it's false or true; when the second parameter is false the list will not clear its selections. The second parameter, for my demo list, must be an empty string when trying to clear the list selections because the LIST's return field is of type character.

                      Comment


                        #12
                        Re: List Control Deselect does not clear e.datasubmitted variable

                        That's why I was asking. With your example UX, with the List return field (ID) being a type of character, "{dialog.Object}.setValue('LIST1',false);" clears the List. It also allows the onSelect to fire. "{dialog.Object}.setValue('LIST1',false,false);" clears the List and suppresses onSelect.

                        Comment


                          #13
                          Re: List Control Deselect does not clear e.datasubmitted variable

                          There is a difference in behavior between Version 12.3 Build 2689 and the last official release of 12.3 Build 2999. I was using 2689 and the second parameter has to be '' to clear the list in my example, presumably because of the character ID field. In build 2999 the second parameter can be false or '' to clear the list!

                          Comment


                            #14
                            Re: List Control Deselect does not clear e.datasubmitted variable

                            Ok... now it makes sense. I had a feeling it was going to come down to an out-of-date release issue because I'd tested this in the last official release, and several of the pre-releases. Good to know.

                            Comment

                            Working...
                            X