Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, August 24, 2025 
 
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!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Grid.GetCurrentField
Bill
Posts: 71
 
Grid.GetCurrentFieldYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 May 08 3:20 PM
I created a new Contact level tab with a datagrid. I am trying to pull the first field from the grid to use in a query for a second grid. I am using dg.getcurrentfield and displaying the value in a message box to make sure it is returning the correct data, but I cannot get the getcurrentfield to pull the value. The field I am trying to pull is populated in my grid. I have the same grid on at the Account level and it is working great. Any suggestions would be greatly appreciated............Thanks!!
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Grid.GetCurrentFieldYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 May 08 5:25 PM
What is it returning for you? Is it blank or ???

FYI - Just wanted to make sure you're clear that GetCurrentField is meant to return a value from the "selected" row, not the first one. Could that be where things are going wrong?
[Reply][Quote]
Bill
Posts: 71
 
Re: Grid.GetCurrentFieldYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 May 08 9:12 PM
Yes, the return is blank. I have this fire on the form open event, and it also fires on the row select event so I can use the value as a condition in my SQL stmt. The same function is working great on the Account level tab that I created.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Grid.GetCurrentFieldYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 May 08 9:21 PM
I would expect that on the form open event that it *would* be blank as the user hasn't "selected" any row yet?
[Reply][Quote]
Bill
Posts: 71
 
Re: Grid.GetCurrentFieldYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 08 8:01 AM
I also tried it on the form change event and it returns a blank. I would think that it should be returning a value when it fires on the OnRowSelect event, that is what has me confused. When I set the .getcurrentfield value to a message box onrowselect the value is empty but the field in the grid contains data.
[Reply][Quote]
Matt Dockins
Posts: 159
 
Re: Grid.GetCurrentFieldYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 08 8:33 AM
Make sure you are using the field alias in the getcurrentfield call and not the field name - i.e. if you have more than 2 tables joined, one will get the alias a2 and the sql from the grid would look like:

select a1.fieldname, a2.fielname a2_fieldname from table1 inner join table2 etc, etc.

when using getcurrentfield you have to reference the alias grid.Getcurrentfield("a2_fieldname") NOT grid.GetCurrentfield("a2.fieldname")
[Reply][Quote]
Bill
Posts: 71
 
Re: Grid.GetCurrentFieldYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 08 9:06 AM
Another way I discovered by accident was by moving the field I needed to the first field in the grid, then when I run the .GetCurrentField I don't pass any field Id and it returns the data. Another issue I ran into is getting the application.BasicFunctions.CurrentContactID to return the Contact Id. When I am on a Contact Tab and set msgbox application.BasicFunctions.CurrentContactID no Id is returned.
[Reply][Quote]
Matt Dockins
Posts: 159
 
Re: Grid.GetCurrentFieldYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 08 2:54 PM
Did you try my suggestion?

Application.BasicFunctions.CurrentContactID won't return anything unless the contact mainview is already open.
[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 © 2025 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): 8/24/2025 4:33:43 AM