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

Show all items in cascading lists

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

  • PhilM1965
    replied
    Re: Show all items in cascading lists

    Hi David,

    I am uncertain of the solution working on cascading lists. I may have tried the 'All categories' button approach when I had it set up as a cascading list, and it failed ... I tried many things til I finally got it to work!

    I think it would be nice to have a few more options on the built-in items to expose more flexibility though. There are UX components that allow for filters to be applied. As I recall though from my investigations yesterday, the server side filter only allowed a filter against a fields, whereas the client side filter allowed me to enter a custom WHERE clause. It was from examining that code behind the Action Javascript that got the solution for me. I highly recommend anyone new to Alpha to look at the Javascript to see what the Action Javascript is doing on your behalf.

    The {dialog.object}._filterlist should be consistent, in my opinion ... i.e. not an added filter. If it is one way on a cascading list and different in non-cascading lists, that leads to confusion (it did for me, but that's not unusual!) ... perhaps adding a check-box to say whether the filter is added to the current filter, or overrides it would give the flexibility needed here. Coming from a different RAD system, it takes time to learn the Alpha way of doing things and on occasion, I do miss the flexibility of the other system when it comes to doing things not originally thought of by the creators. I'll get there

    But as you say, there is always more than one way to skin a cat.

    Cheers,

    Phil

    Leave a comment:


  • Davidk
    replied
    Re: Show all items in cascading lists

    Hey Phil,

    I'm not so sure you could have left this as Cascading Lists. I was looking at this before you posted and, unless I'm mistaken, if you set a List as having a Parent List, then you must set a filter and part of that filter must be an argument pointing to the parent list. So you must have an opening filtered list. Also, I believe {dialog.object}._filterlist is an added filter in the case of Cascading Lists. Whatever filter you set is in addition to the cascading list filter. Your solution is the one that works and allows for a really customized "cascading" list. Really nice. This is a really good example of what to appreciate in Alpha. If you can't use an option the way it was built to be used, then just do it yourself... with 2 lines of code.

    Leave a comment:


  • PhilM1965
    replied
    Re: Show all items in cascading lists

    Ok, here is what I did ...

    I changed the lists from being cascading lists to being independent lists.

    I set the filter on the second list to show all items from the data I wanted ...
    Code:
    StartDate <= getdate()  AND  EndDate >= getdate()
    so that all records in the list would be displayed upon entering the dialog.

    I set an argument called aCategory in the 'parent' list to be the category field from that list ... Alpha returns that value when an item is clicked.

    I then added a button with the following code in the 'On Click' ... essentially the same as the original SQL filter to reset the list to it's original state as it would be on entering the dialog (List1 is the 'child' list). This button is called 'All Categories'. The second parameter is the list I wish to filter (List1). The third parameter is the sort field, and the final parameter is left blank as I am not using parameters.

    Code:
    {dialog.object}._filterList('LIST1','StartDate <= getdate() AND EndDate >= getdate()','StartDate','');
    In the List Properties of List2 (the 'parent' list) in the OnClick section, I entered the following code

    Code:
    {dialog.object}._filterList('LIST1','StartDate <= getdate()  AND  EndDate >= getdate()  AND  Category = :aCategory','StartDate','');
    This is essentially the same code as above but note we are also using the argument aCategory.

    This allows me to show the records filtered between the dates I want, but just for the selected list.

    Looking back, I could have probably just left it as a cascading list with the 'All Categories' button added as above, but hey ... it works now and if I need to add something else in, I already have a place to incorporate extra code

    Well, I hope that helps someone in the future!

    Leave a comment:


  • PhilM1965
    started a topic Show all items in cascading lists

    Show all items in cascading lists

    Hi All

    I have two cascading lists that work just fine. I would like the child list to show all items in the list when there are no items selected in the parent list. Currently, no items are shown until an option in the parent list is selected.

    I have a button which allows me to deselect the list using

    Code:
    var lObj = {dialog.object}.getControl('list2');
    lObj._deselectAll();
    (btw ... list1 is the child list, list2 is the parent list)

    I would like to be able to click the button and effectively set the list to the same filter as the parent list, but omitting the argument from the filter.

    Eg ... filter for list might be, when an item is selected :

    WHERE StartDate >= getdate() AND EndDate <= getdate() AND Category = :aCategory (this works fine in the cascading list)

    What I would like to happen when the button is clicked is for the parent list to have it's options deselected and the filter to now be

    WHERE StartDate >= getdate() AND EndDate <= getdate()

    I would prefer to have this as being a 'feature' of the parent list, rather than a function of the button, so that the child list displays all the records ignoring the argument, i.e. once the button sets the parent list choices to be deselected, then that should trigger the second WHERE clause above, and also that the second WHERE clause is the one used on entering the dialog (I have 'Allow Null selection' checked in both lists).

    Possible? Clear as mud?

    TIA

    Phil
Working...
X