Alpha Video Training
Results 1 to 10 of 10

Thread: Problem when trying to filter based on session variable

  1. #1
    Member
    Real Name
    Josh Cole
    Join Date
    Nov 2009
    Posts
    296

    Default Problem when trying to filter based on session variable

    This grid will save/publish and display fine until I add this to the filter expression.

    TECHNAME = :arg:mytasks

    The error I receive at that point is:

    Fatal Error:

    SQL Query does not include all of the primary key columns. The primary key must be included if the detail view is editable, or if the grid has a detail view that is not set to pre-fetch data.

    The only primary key in this tale is Task_ID and it is selected. Anyone else having this problem and know how to fix it?

  2. #2
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Problem when trying to filter based on session variable

    Yes but is it included in the detail view?

  3. #3
    Member
    Real Name
    Josh Cole
    Join Date
    Nov 2009
    Posts
    296

    Default Re: Problem when trying to filter based on session variable

    Yes it is

  4. #4
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Problem when trying to filter based on session variable

    the where clause should read

    TECHNAME=:MYTASKS

  5. #5
    Member
    Real Name
    Josh Cole
    Join Date
    Nov 2009
    Posts
    296

    Default Re: Problem when trying to filter based on session variable

    I defined an argument which I called mytasks. It is a session variable. session.techname which is set and is working. It is a character field and was defined as such when creating the argument.

    TECHNAME = :mytasks AND COMPLETE = .F. is my where clause


    This is the error I receive when I try to look at the record detail.

    Could not get count of records in query.
    One or more argument values were referenced in the SQL query, but were not found in the argument list

  6. #6
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Problem when trying to filter based on session variable

    You have to use sql syntax so .f. doesn't mean anything

    complete ='0' or complete='false'

  7. #7
    Member
    Real Name
    Josh Cole
    Join Date
    Nov 2009
    Posts
    296

    Default Re: Problem when trying to filter based on session variable

    Actually Complete = .F. has been working just fine. It's just getting it to return records for the tech that's been the problem.

  8. #8
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Problem when trying to filter based on session variable

    When you test, you are testing after publishing to the WAS or AFAS as they call it now? That's the only time the session variables are available and/or local webroot publishing.

  9. #9
    Member
    Real Name
    Josh Cole
    Join Date
    Nov 2009
    Posts
    296

    Default Re: Problem when trying to filter based on session variable

    I am not sure if it is the most recent build but in the field properties I am able to tick an option that treats the field as a logical field. Maybe that is the reason I don't have to use mysql syntax to accomplish the filter based on the Complete value being False. All I know is that it's working as is other than to allow me to filter based on the techname.

  10. #10
    Member
    Real Name
    Omar Garcia
    Join Date
    Jun 2006
    Location
    Alamo, Texas
    Posts
    582

    Default Re: Problem when trying to filter based on session variable

    Quote Originally Posted by envisionsolutions View Post
    I defined an argument which I called mytasks. It is a session variable. session.techname which is set and is working. It is a character field and was defined as such when creating the argument.

    TECHNAME = :mytasks AND COMPLETE = .F. is my where clause


    This is the error I receive when I try to look at the record detail.

    Could not get count of records in query.
    One or more argument values were referenced in the SQL query, but were not found in the argument list
    In looking at this error again, did you define the argument and set it to a session variable?

Similar Threads

  1. Filter Dropdown based on protected session variable and/or security group
    By den1s in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 10-01-2010, 11:09 AM
  2. Show/Hide in Dialog based on session variable
    By Tommy Thompson in forum Application Server Version 9 - Web/Browser Applications
    Replies: 4
    Last Post: 09-19-2008, 06:50 PM
  3. How do you filter out a *field* based on a session variable?
    By al mecklenburg in forum Application Server Version 8
    Replies: 3
    Last Post: 01-10-2008, 02:30 PM
  4. Session Variable Filter Problem
    By den1s in forum Web Application Server v7
    Replies: 10
    Last Post: 02-07-2007, 07:42 AM
  5. Set Session Variable Based on Selected Grid Row
    By rsmereka in forum Web Application Server v7
    Replies: 10
    Last Post: 01-08-2007, 01:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •