Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, September 28, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Client (Pre-7.2)
Forum to discuss using & developing the legacy SalesLogix Web Client (For versions 7.0 and earlier). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Client (Pre-7.2) | New ThreadView:  Search:  
 Author  Thread: Hide column in query
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Hide column in queryYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Jan 07 9:07 AM
fiogf49gjkf0d
Is it possible to add a column to a query but not have it display? I modified the opplist query that produces the opportunities grid in under contacts. There is a javascript function that uses the oppcalcdays alias/column when the screen is activiated. Not sure what the implications would be if I disabled the script, but if I can hide the column I will be all set. Thanks
[Reply][Quote]
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Re: Hide column in queryYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Jan 07 10:16 AM
fiogf49gjkf0d
Actually I found a way around this, but am still curious if it can be done. Documentation a bit nonexistant regarding this kind of thing. thanks
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Hide column in queryYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Jan 07 10:22 AM
fiogf49gjkf0d
Steve,

It is possible.

I'll give an example using the templates searchcondata and the query con_con and hiding the workphone column because I happened to have done an example on it for something else.

First, copy the query "con_con" and open it. Note that on the layout tab/Table Properties there's an ID on the table called CONRESULTS. While the table properties is selected, click on the "ONRENDERCOMPLETE" and in the value box, modify the value so it reads:

"setTarget();myfunction();"


Basically, add the ";myfunction();" to what's already there. That will call the function myfunction after it calls setTarget which fires when rendering is complete for the grid. Now, while you still have the table selected in the drop down that says "Select table component to modify", click in the markup box and type "WORKPHONECOL", add the value of "2" and click "Set". This is the zero-based index of the column to hide - in this case, column 2.

(The reason you have to put it there is so that it's not hard-coded to column 2 in the javascript on the page itself - if the column ever changes, you'll have to change that property. Originally, I used to put an "ID" with a column name in the markup/value pair for the column and search until I found that column. The problem was that unless you have a result row, you couldn't find the ID - the web DLL doesn't put that markup on the table header row. So, at least this way, the javascript isn't hard-coded with a column number, it's a part of the query object.)

Next, copy, activate and open the template "searchcondata". Inside the JavaScript area, add this function:


function myfunction(){
var grid = document.all.CONRESULTS;
for (row=0; row<=grid.rows.length-1; row++)
{
// The commented line below will delete. The two below that that
// are uncommented will just hide it.
//grid.rows[row].deleteCell(grid.WORKPHONECOL);
grid.rows[row].cells[grid.WORKPHONECOL].style.display = "none";
grid.rows[row].cells[grid.WORKPHONECOL].style.visibility = "hidden";
}
}


Shutdown, flush, and test. That should do it.

Basically you have to:
1) Put the column name/number in a markup/value on the query object
2) Add a call to a custom function on the query object in the ONRENDERCOMPLETE method
3) Add the custom function to the page the query object is on

Let me know if this helps you out or you have more questions!

Jeff
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 9/28/2024 6:30:47 PM