You need to sign in to do that
Don't have an account?
jmasl7
2 Picklist fields, one setting the value of another
Is there anyway to do the following, possibly using S-Controls/Javascript?
I'd like to add a custom picklist field called 'Subtype' to the Task object and define the values of this field such that each value corresponds to a valid value of the (standard) 'Type' field.
Whichever value the user enters/selects for the 'Subtype' field would then automatically set the value of the 'Type' field.
For example a value of 'Normal visit' in Subtype would set the value of Type to 'Visit'.
Generally speaking there would be several 'Subtype' values corresponding to each 'Type' value.
Ideally, the Type field would not be displayed on the Task Page at all, but if it can't be removed then as long as it's value was set automatically - possibly with invalid combinations of values being disallowed by a Validation Rule - then this would be ok. What has to be avoided if possible (users have already been promised they won't have to do this) is for the user to have to enter both values.
Can this be done?
Thanks and regards
John
This works fine when I try in in a standalone Javascript page created in Notepad:
Code:
However, when I try and implement this through an S-Control, I run into the problem that the S-Control only runs when the page is shown in 'display' mode, but not in 'edit' mode. Obviously it's only in edit mode that I need this to work.
Is there any solution to this and/or an alternative means of achieving the same thing?
Thanks in advance
John
thanks for the suggestion.
However, as far as I can see, it's not possible to use the standard field 'Type' in a field dependency for the 'Activity' object.
When I try and create a new Field Dependency, the only fields it lets me use for the Controlling Field are Priority, Status, Visible in Self-Service, All Day Event, Private and my custom 'Subtype' field. For the Dependent Field the only field it lets me use is my custom Subtype field.
If I create another custom field 'Type2' and give it the same picklist values as Type then it lets me set up a dependent picklist. For example a 'Subtype' value of 'Normal Visit' is valid only for a 'Type' value of 'Visit'. By making this a required field on the Page Layout, I found that it results in the correct value being automatically set in the 'Type2' field whenever a value is set in the 'Subtype' field.
However I need the standard 'Type' field to contain the correct value (because it's used in a lot of Reports). Would there be any way I could automatically set 'Type' equal to 'Type2' in all instances? I don't think I can make 'Type' a formula field, can I?
Regards
John