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

'Calendars to show' control - how can I get a session variable to filter?

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

    'Calendars to show' control - how can I get a session variable to filter?

    The calendar seems to provide two possibilities for filtering the calendars which will display. I can't get either to work successfully.

    The 'Calendars to show' option in Properties/Calendar Options looks as if it should be able to do the job, but it only provides for 'All' calendars to show or for a static list to determine which calendars show.

    In Properties/Arguments I've set up an argument to use a session variable as shown in the attached view. It's called 'Cluster' and is numerical. This just sends A5 into a spin.

    Either way I haven't been able to filter the calendars other than with a static list. This should be easy, but I have watched the vids and read this forum without being able to find a straight-forward answer - or even a convoluted one! Maybe I'm looking in the wrong place. Can anyone help?
    Attached Files

    #2
    Re: 'Calendars to show' control - how can I get a session variable to filter?

    I'm not seeing what you show in your attached image. Are there different Calendars? I get into the Calendar Properties, Calendars to show, and I can set this option to All or a Calendar Name. You use the Grid to set a session variable and, from the Grid, over-ride the Calendars to show option.

    Comment


      #3
      Re: 'Calendars to show' control - how can I get a session variable to filter?

      I've been trying to get the 'Arguments' property (near the bottom of the Calendar component properties) to set my session variable. By that I mean that I've changed the default argument named 'Calendars to show - set value at runtime,' to get the argument value from my session variable. (Try double clicking on my 'snipping tool' graphic to see what I've done in the arguments property of the Calendar component). This solution returns an unnamed calendar only.

      "You use the Grid to set a session variable ..." which grid are you referring to? Do I need to set up a grid component, set the session variable and then link it to the existing calendar component to get the variable to work? Not sure I follow you here.

      Comment


        #4
        Re: 'Calendars to show' control - how can I get a session variable to filter?

        Now I see... thanks... and that works for me too.

        Where ever you're calling your calendar from, you need to create and assign your session variable. E.g. I have a grid, with a Server-side event, OnGridInitialize, where I set my session variable... Session.myCurrCal = 4

        From there, set up the session variable in the calendar as you have done and that's it. Doesn't matter where you're calling the calendar from, as long as you have your session var established before the call.

        Comment


          #5
          Re: 'Calendars to show' control - how can I get a session variable to filter?

          I'm not sure where I'm 'calling' the calendar from. I've set up the main calendar component (listed as type Web2Cal Calendar), which I've then 'incorporated' in the TabbedUI. I've set up the session variable in the Login_Processing page as per Steve Workings video. Am I 'calling' it from TabbedUI or the calendar component?

          If I'm calling the calendar from the TabbedUI (and therefore I set the argument here too), then that's great news, because presumably this means that I can set my session variable just once - in the TabbedUI - rather than in each component?
          If I'm calling the calendar from the Calendar component, then it should filter where I've got it.

          Am I on the right track?

          Comment


            #6
            Re: 'Calendars to show' control - how can I get a session variable to filter?

            Yes... sounds like it. You're setting your session var in the Login_Processing page... and you have that session var set as the argument in your calendar. I would think that should work. Going to go try it.

            Comment


              #7
              Re: 'Calendars to show' control - how can I get a session variable to filter?

              Looking again at the Argument property on the calendar component - it only gives an opportunity to insert the argument, ie to state that something in the Calendar table must equal the session variable. It doesn't give the opportunity to specify which field in the Calendar component will be compared to the session variable. I think the question I should be asking is: where do I get the chance to specify which field in the Calendars component will be compared to the session variable?
              Again, thanks for bending your brain to this one.

              Comment


                #8
                Re: 'Calendars to show' control - how can I get a session variable to filter?

                It depends on how you set up your calendar component. When you set it up, you get the opportunity of creating your calendars table. In the created table is the field GROUPID... that's what is used. The calendars table holds names of calendars and this is the id into the table. When you specify your own table you set up the field map and specify the primary key field. It's this primary key field, which you can set, that is compared to the session var. Setting it up yourself means settings the field map for the calendars table and the events table.

                Comment


                  #9
                  Re: 'Calendars to show' control - how can I get a session variable to filter?

                  Ah! Thanks. So the session variable is compared to the Calendar GroupID field.
                  But, the GroupID field is listed as a primary key i.e. each row is unique. This presents a problem if I want to use the GroupID field for filtering for example if I want to filter all records belonging to a particular CompanyBranch (which I do), comparing my session variable to the GroupID field won't help.
                  There must be some way to compare the session variable to another field in the Calendar table - for example 'somefield'=:BranchID field. Using the GroupID field here (being a primary key) wouldn't help.
                  So, in the Calendars Properties section, I have re-defined the 'Calendars to Show' argument to a numerical session variable (session.BranchID). But at this stage the Calendar component hasn't compared this session variable to anything - so all calendars are displayed on my screen.
                  I hope this explains my problem more clearly.
                  Last edited by Malcolm; 05-30-2012, 05:26 PM. Reason: clarify explanation

                  Comment

                  Working...
                  X