Results 1 to 2 of 2

Thread: search/new listview on action button press

  1. #1
    vistar86 is offline Sugar Community Member
    Join Date
    Jan 2012
    Posts
    32

    Default search/new listview on action button press

    Hi ive been struggling with Sugar for ages with this issue, i cannot find any decent info, or if i do find info i can never get it to work as expected.

    How can i make this query on listview into an action button:

    PHP Code:
    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    require_once(
    'include/MVC/View/views/view.list.php');

    // name of class match module
    class REP_Tech_SupportViewList extends ViewList{

        
    // where clause that will be inserted in sql query
        
    var $where 'priority = \'P1\'';
         function 
    REP_Tech_SupportViewList()
         {
             
    parent::ViewList();
         }

         
    /*
          * Override listViewProcess with addition to where clause to exclude project templates
          */
        
    function listViewProcess()
        {
                
    $this->lv->setup($this->seed'include/ListView/ListViewGeneric.tpl'$this->where$this->params);
                echo 
    $this->lv->display();
        }

    }

    ?>
    i have the button setiup in menu.php which shows in menu and this works on original listview, but i want a custom listview appear on a button click, but uses the original listview.

    so, its a search type method without it looking like a search, more like a brand new listview, when infact its just using one big table.

    thanks in advance
    Brendan

  2. #2
    developer.tim is offline Junior Member
    Join Date
    Jul 2011
    Posts
    2

    Cool Re: search/new listview on action button press

    Quote Originally Posted by vistar86 View Post
    Hi ive been struggling with Sugar for ages with this issue, i cannot find any decent info, or if i do find info i can never get it to work as expected.

    How can i make this query on listview into an action button:

    PHP Code:
    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    require_once(
    'include/MVC/View/views/view.list.php');

    // name of class match module
    class REP_Tech_SupportViewList extends ViewList{

        
    // where clause that will be inserted in sql query
        
    var $where 'priority = \'P1\'';
         function 
    REP_Tech_SupportViewList()
         {
             
    parent::ViewList();
         }

         
    /*
          * Override listViewProcess with addition to where clause to exclude project templates
          */
        
    function listViewProcess()
        {
                
    $this->lv->setup($this->seed'include/ListView/ListViewGeneric.tpl'$this->where$this->params);
                echo 
    $this->lv->display();
        }

    }

    ?>
    i have the button setiup in menu.php which shows in menu and this works on original listview, but i want a custom listview appear on a button click, but uses the original listview.

    so, its a search type method without it looking like a search, more like a brand new listview, when infact its just using one big table.

    thanks in advance
    Brendan
    Hi,
    Can u explain in more detail wt exactly you want to implement, or you can use create_new_list_query() function for that module to create ur own custom list view query to display filtered data in ur modules' list view.

    Regards,
    Dhaval

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. No Action button Found under ListView of any Modules
    By naal1 in forum Developer Help
    Replies: 2
    Last Post: 2011-06-01, 01:08 PM
  2. Not Finding ListView action
    By webdevil25 in forum Developer Tutorials
    Replies: 1
    Last Post: 2011-05-17, 12:55 PM
  3. Custom ListView button calls action
    By ReginaRoder in forum Developer Help
    Replies: 3
    Last Post: 2009-08-18, 04:53 AM
  4. Replies: 0
    Last Post: 2009-03-25, 10:02 AM
  5. "search button" press which file is call in Basic Search.
    By shyam007 in forum Developer Help
    Replies: 4
    Last Post: 2009-01-12, 02:56 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
  •