Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, July 8, 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: Setting a NULL value to Blank usimg Query Builder
Aparna Khade
Posts: 11
 
Setting a NULL value to Blank usimg Query BuilderYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 10 11:49 AM
Hi,

I have added a column from a table in to the Layout within Query Builder for a form. When the plugin is released and the form is viewed in SalesLogix client, I see this column in the data grid as expected. However, I get error on rows for which this column has NULL values. Is there any way to set the NULL value to blank (it's of String datatype) in order to get rid of this error. I have looked in all tabs in the Query Builder, but fail to see any solution.
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Setting a NULL value to Blank usimg Query BuilderYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 10 12:33 PM
Please post the text of the error message you are getting.
[Reply][Quote]
Aparna Khade
Posts: 11
 
Re: Setting a NULL value to Blank usimg Query BuilderYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 10 12:41 PM
It's a script error with the following message:

An error occurred executing active form script (Contact:Opportunities).
Error calling method AXFormChange.

Could not convert variant of type (NULL) into type (String)

at line 161, char 8
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Setting a NULL value to Blank usimg Query BuilderYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 10 12:44 PM
That's not a QB error - it's an error in the script behind the form.

Can you post line 161 of the code & maybe I can suggest a modification ...
[Reply][Quote]
Aparna Khade
Posts: 11
 
Re: Setting a NULL value to Blank usimg Query BuilderYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 10 12:50 PM
Yes, it's not a QB error. However, I wanted to know if I could somehow set a valid value for a NULL column through QB.

Line 161 of the code is as follows:

frmOpportunityContacts.AddToContextList "OPPORTUNITY", grdOppContacts.GetCurrentField("OPPORTUNITYID"), grdOppContacts.GetCurrentField("A2_DESCRIPTION") 'DNL

Problem occurs when the value for A2_DESCRIPTION is NULL.
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Setting a NULL value to Blank usimg Query BuilderYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 10 12:55 PM
Try this:


frmOpportunityContacts.AddToContextList "OPPORTUNITY", grdOppContacts.GetCurrentField("OPPORTUNITYID"), "" & grdOppContacts.GetCurrentField("A2_DESCRIPTION") 'DNL
[Reply][Quote]
Aparna Khade
Posts: 11
 
Re: Setting a NULL value to Blank usimg Query BuilderYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 10 1:21 PM
Thank you. It worked like a charm.
It's a pity though that QB does not provide a feature to replace NULL values appropriately. It's not fun for people who do not know scripting. I wanted to show the end user an easier way to to this other than changing the code.
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Setting a NULL value to Blank usimg Query BuilderYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 10 3:52 PM
You seem to have a point. But there is an easier way - this is what you say to your end user:

"Make sure your opportunities always have a description"

[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): 7/8/2025 7:38:46 AM