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!
|
|
Setting a NULL value to Blank usimg Query Builder
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. |
|
|
| |
|
Re: Setting a NULL value to Blank usimg Query Builder
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 |
|
|
| |
|
Re: Setting a NULL value to Blank usimg Query Builder
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. |
|
|
| |
|
Re: Setting a NULL value to Blank usimg Query Builder
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. |
|
|
| |
|