2/19/2025 3:58:13 PM
|
|
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!
Forum to discuss general T-SQL questions and help with queries related to SalesLogix data. View the code of conduct for posting guidelines.
|
|
|
|
Calculated Field for Birth Month![Your last visit to this thread was on 1/1/1970 12:00:00 AM](/images/forumimages/new.gif)
Posted: 20 Dec 06 3:59 PM
|
fiogf49gjkf0d I am trying to create a calculated field to display only the month of a contact birthday and I have run myself in circles. I suspect there is an obvious and simple answer that I am overlooking. To start, the Birthday month is displayed on legacy form "Details" but Sage has ever so politely informed me that the logic/field can't be referenced elsewhere. The simple SQL I need is as follows;
select month(birthday) from contact where not birthday is null
I want to create a contact group for all contacts with a birthday and display in the layout their birth month. I have tried creating a calculated field (select month(birthday) from contact where not birthday is null and month(birthday) = '12') field but it seems that the date/type field type does not cooperate with the Integer or String calculation types available as calculated fields. I also tried the super simple solution of formatting the layout of the birthday field in Query Builder to 'mmmm' but that gives me a value of December for every record. I have tried about a dozen other variations and tricks but have yet to get to Eureka! I appreciate the help. |
|
|
|
Re: Calculated Field for Birth Month![Your last visit to this thread was on 1/1/1970 12:00:00 AM](/images/forumimages/new.gif)
Posted: 21 Dec 06 8:14 AM
|
fiogf49gjkf0d In SLX version 6.2 and 7.0 it's quite easy: - Manage, Calculated Fields - click Add button - under the Properties tab: - enter "BirthMonth" (or whatever) into the fields Name, Alias, & Description - select "Contact" for "Base Table" and "Numeric" for Calc.Type - click OK - select the BirthMonth line in the calulated field list and click Edit - under the Calculation tab: - in the big white space enter "Month(" - drag Birthday from the Contact data field list and drop after the open paren - enter ")" after the birthday field name - it shoud look like this: Month(°Contact.Birthday°) - click OK then Close - restart your Sales Client
You can now use the BirthMonth field in a group's layout or conditions tabs. Setting up the condition "BirthMonth equal to 12" lists only contacts with December birthdays, excluding contacts with no birthday set (i.e. null).
|
|
|
|
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!
|
|
|
|
|
|
|
|