Help & Support
Contents
Display Legacy Contents

Search:

Home > Impact Suite > How-To Examples > Cascading Drop Down

Cascading Drop Down

You can create cascading dropdown using the math functions in Impact Suite v5. Using the description of a pick list you can populate a second field. An example could be you are selecting an automobile and would like the price to be entered into a second field in the contact table.

Another example would be when selecting the ID/Status the drop down also populates a field named 'Active' based on the selection. For this example create a pick list with the descriptions filled in. These descriptions will be used to populate the second field. Here we have editing the ID/Status pick list to describe the active and non-active status of each in the description portion.



Second. We need to create a math formula to use this pick list.

  1. In Act! go to the TOOLS menu and select IMPACT SUITE
  2. Go to the MATH tab on the left side
  3. Click on the [Create Formula] button
  4. Select your result field ( in the screen shot below its 'User 3' )
  5. Then copy and paste this code into the formula area.
You need to change two values in the formula. 
a) "TBL_CONTACT.ID/STATUS" needs to be changed to the field with the drop down ( Notice this one is in QUOTES)
b) [TBL_CONTACT.ID/STATUS]" needs to be changed to the field with the drop down ( Notice this one is in BRACKETS)

6. Click the SAVE button 



This code should be used when on the CONTACT table
'-------------------------------------------------------------------------------------------
' The code below is the formula for CONTACT. Copy down to and include the 'Return' line.
'-------------------------------------------------------------------------------------------
' Get the Contact Field Descriptor
' for the current field
' NOTE - This field should be in QUOTES
'        example "TBL_CONTACT.ID/STATUS"
'-------------------------------------------------------------------------------------------
Dim fd as Act.Framework.Contacts.ContactFieldDescriptor = Durkin.Common.Classes.Contacts.GetContactFieldDescriptorByANY("TBL_CONTACT.ID/STATUS", Me.HostFramework)

'-------------------------------------------------------------------------------------------
' Return the 'Description' portion 
' on the selected pick list item
' NOTE - This field should be in BRACKETS
'-------------------------------------------------------------------------------------------
Return Me.HostFramework.PickLists.GetPickList(fd).Items([TBL_CONTACT.ID/STATUS]).Description

This code should be used when on the Opportunity table
'-------------------------------------------------------------------------------------------
' The code below is the formula for Opportunity. Copy down to and include the 'Return' line.
'-------------------------------------------------------------------------------------------
' Get the Opportunity Field Descriptor
' for the current field
'-------------------------------------------------------------------------------------------
Dim fd as Act.Framework.Contacts.ContactFieldDescriptor = Durkin.Common.Classes.Opportunities.GetOpportunityFieldDescriptorByANYMutable(Me.HostFramework, "[field name]")

'-------------------------------------------------------------------------------------------
' Return the 'Description' portion
' on the selected pick list item
' NOTE - This field should be in BRACKETS
'-------------------------------------------------------------------------------------------
Return Me.HostFramework.PickLists.GetPickList(fd).Items([field name]).Description

This code should be used when on a custom table
'-------------------------------------------------------------------------------------------
' The code below is the formula for CUSTOM TABLES. Copy down to and include the 'Return' line.
'-------------------------------------------------------------------------------------------
' Get the Contact Field Descriptor
' for the current field
' NOTE - This field should be in QUOTES
'        example "TYPE"  ( DO Not add the leading table name )
'-------------------------------------------------------------------------------------------
Dim fd as Act.Framework.CustomEntities.CustomEntityFieldDescriptor = Durkin.Common.Classes.CustomSubEntity.GetFieldDescriptorByANYString("TYPE",SubEntityForm.GetEntityManager)

'-------------------------------------------------------------------------------------------
' Return the 'Description' portion 
' on the selected pick list item
' NOTE - This field should be in BRACKETS ( Leading TableName required )
'-------------------------------------------------------------------------------------------
Return Me.HostFramework.PickLists.GetPickList(fd).Items([CUST_SupportAgreements.TYPE]).Description


See also



Properties
Article ID:
cascading_drop_down
Views: 262
Created By: jimdurkin
Modified By: [Modified By]
Created Date: 3/24/2014 12:31 PM
Last Modified: 3/24/2014 1:55 PM
Actions
Print This Article
Bookmark
Email This Article
Previous Article
Next Article