Advanced Options
| To... | InterAction Out-of-the-Box Example | Do the following... |
|---|---|---|
| Concatenate fields, two fields | Contact Activities | Enter the following in a new calculated field, then select that calculated field in the DataField property under the Data section for the textbox: Type is System.String ? "| " + Originator_Name + " " + Originator_Job_Title + " " + Originator_Primary_Phone : null; This statement concatenates the Originator Name, Originator Job Title, and Originator Primary Phone fields. In your use, remember to always place a plus sign (+) between the fields you want to concatenate. The quotes in this example create a space between fields. |
| Concatenate fields, static text and a field | Contacts by Sponsor | Enter the following in a new calculated field, then select that calculated field in the DataField property under the Data section for the textbox: = "Contacts by Sponsor: " + Marketing_List This statement concatenates the phrase “Contacts by Sponsor:” and the name of the current marketing list. For example, if you run the report against the “Black Tie Event” marketing list, the field will display “Contact List by Sponsor: Black Tie Event.” In your use, remember to always place a plus sign (+) between the fields you want to concatenate. |
| Concatenate fields, a list of values | Name, Company, Job Title & Contact Types Overview report section | Enter the following in a new calculated field, then select that calculated field in the DataField property under the Data section for the textbox: =Contact_Types is System.String ? "(" + Contact_Types + ")" : null; This statement concatenates parentheses to the Contact Type field. Example: (Client; Pros) In your use, replace Contact_Types with the field to list data. |
| Display a field based on a value of a different field | Engagements by Contact With Associated Company | Enter the following in a new calculated field, then select that calculated field in the DataField property under the Data section for the textbox: = Person_Company_Indicator == "Person" ? Company_Name : Company_AKA ; This statement says that if the field Person_Company_Indicator is set to Person, then the textbox displays the value in the Company_Name field. Otherwise, display the value in the Company_AKA field. In your use, replace the following: Person_Company_Indicator with the name of the field on which you want to base the change Person with the value you are acting off in the field Company_Name with the text you want to display in the field if the value of the field matches the one you have specified Company_AKA with the text you want to display in the field if the value of the field does not match the one you have specified You can also “nest” if statements by placing parentheses around values: =Engagement_Contact_Roles is System.String ? Engagement_Contact_Roles : (Name is System.String ? "No Roles" : null); This statement says that if the field Engagement Contact Roles contains data, then display that data in the Engagement Contact Roles field. Otherwise, display information according to the following rule: If the Name field contains data, then display “No Roles,” otherwise, leave the field blank. |
| Display a blank space if a field is set to a certain value | Relationship List | Enter the following in a new calculated field, then select that calculated field in the DataField property under the Data section for the textbox: =Relationship is System.String ? null : "No relationships recently added."; This statement says that if the field Relationship has any value, then the field is blank in the report. Otherwise, display “No relationships recently added.” In your use, replace the field Relationship with the name of the field you want to use. Replace System.String with the value you want to replace with a blank space. |
| Substring (pull out the first or some set of characters from a field) | Telephone Directory | Add a textbox to the report. In the DataField property under the Data section, enter the following: =Full_Name.Substring(0,1).ToUpper(); This statement takes the first character of Full_Name and displays it in the textbox in upper case. In your use, do the following: Replace Full_Name with the field you want to take characters from Replace 0 with the first character you want to extract. 0 takes the first character, 1 takes the second character, and so on. Replace 1 with the number of characters you want to extract. 1 takes only one character, 2 would take the first two characters from the start character, etc. Replace ToUpper with ToLower to display the characters in lower case |
| Display a check box as selected or cleared based on a value in a field | None | Add a check box control to the report. In under the Data section of the properties for the check box, do the following: In the DataField property, enter the following: =Attended == "Yes" ? true : false In the Text property, enter the following: Attended This statement says that if the value in the field Attended is Yes, then show the check box as selected. Otherwise, show the check box as cleared. In your use, do the following: Replace Attended with the name of the field you want to use to set the check box as selected or cleared. Replace Yes with the value in that field you want to use to set the check box as selected. Replace Attended in the Text property with the label you want for the check box. |
| Display data as a barcode | None | Add a barcode control to the report. In the Datafield property under the Data section for the barcode control, select the field you want to display as a barcode. |
| Add the current date to the report | In PageFooter section of all InterAction out-of-the-box reports | Add a TextBox control to your report. Enter the following in a new calculated field, then select that calculated field in the DataField property under the Data section for the textbox: =System.DateTime.Now.ToShortDateString() |
| Subtract a date from today’s date to calculate a number of days | None | Add a textbox to the report. Enter the following in a new calculated field, then select that calculated field in the DataField property under the Data section for the textbox: =System.DateTime.Now.Subtract(StartDate) This statement takes today’s date (System.DateTime.Now) and subtracts the second date (StartDate) to result in a number of days. |
| Compare a date to the current date and display a message based on the comparison | None | Add a textbox to the report. Enter the following in a new calculated field, then select that calculated field in the DataField property under the Data section for the textbox: =System.DateTime.Now.Subtract(StartDate) >= System.TimeSpan.Zero ? "Past" : "Future"; This statement says that if the date is less than today, display Past, otherwise show Future. The first part subtracts the start date from the current date and results in a time span which is a number of days, hours, minutes, and seconds. The second part represents the value zero for days, hours, minutes, and seconds. This statement works with the StartDate field. In your use, replace the following: StartDate with the name of the date field you want to use >= with the comparator you want to use (<,>, <=, >=, =) Past with the label you want to show if the criteria is met Future with the label you want to show if the criteria is not met |
| Display a message based on a comparison of a date to the current date on the user's machine | Stagnant Contacts report | Add a textbox to the report. In the DataField property under the Data section enter the following: =Start_Date>System.DateTime.Now.AddDays(-181) ? "Recently Contacted (in order of last contact date) " : "Stagnant (no communication in 6 months, in order of last contact date)" This statement says that if the value in the Start_Date field is greater than 181 days before the current date on the user's machine (more recent than 181 days ago), display the message “Recently Contacted (in order of last contact date).” Otherwise, display “Stagnant (no communication in 6 months, in order of last contact date).” In your use, do any of the following: Replace StartDate with the name of the field on which you want to do the comparison Replace > with any of the following: <,>, <=, >= Replace -180 with the number of days prior to the current date for which you want to do the comparison Replace the text in quotes with the words you want to display in the field |
| Sum items in a group | None | In the GroupFooter section for the group, draw a textbox. In the properties for the textbox, specify the following in the Summary section: Set SummaryFunc to Sum Set SummaryGroup to GroupHeader1 (or whatever group you are summing) Set SummaryRunning to Group Set SummaryType to SubTotal In the Data section of the properties area, set the DataField property to the field that you want to sum. |
| Count items in a group | Activities by Originator | In the GroupFooter section for the group, draw a textbox. In the properties for the textbox, specify the following in the Summary section: Set SummaryFunc to Count Set SummaryGroup to GroupHeader1 (or whatever group you are counting) Set SummaryRunning to Group Set SummaryType to SubTotal In the Data section of the properties area, set the DataField property to the field that you want to count. Note: You cannot count a date field in a GroupFooter section. |
Create a numbered list For example: 1. Bill Johnson 2. Karen Smith 3. Sean White | None | In the detail area of the report, draw a textbox for the number. In the properties for the textbox, specify the following in the Summary section: Set SummaryFunc to Count Set SummaryRunning to All Set SummaryType to Grand Total In the Data section of the properties area, set the DataField property to the field that you want to count. |