Default value of dropdown field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 11:25 PM
Hello ,
I have hr case table extending task table , their is field called as contact type on task table , it is configured as dropdown with none . So when I create HR case from backend I want that by default it should populate the value as none , how to do this.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 11:37 PM - edited 09-16-2024 11:38 PM
Hello,
To ensure that the contact_type
field in the HR case table is populated with the value "None" by default when creating an HR case from the backend, you can follow these steps:
-
Update the HR Case Table Definition: Verify that the
contact_type
field is properly configured in the HR case table to have "None" as a valid option in its dropdown list. -
Set Default Value in the Dictionary Entry:
- Navigate to the table definition for the HR Case table in your system.
- Locate the
contact_type
field in the list of fields. - Edit the dictionary entry for this field.
- Set the "Default Value" property of the
contact_type
field toNone
or the appropriate default value if it's a specific value representing "None" (such as an empty string or a particular value in your dropdown options).
Scripted Approach: If you are creating HR cases programmatically (e.g., through a script or backend logic), ensure that the default value is set in your script. Here's a sample script in a business rule or script include:
(function executeRule(current, previous /*null when async*/) {
// Check if this is a new record
if (current.isNewRecord()) {
// Set the default value for contact_type field
current.contact_type = 'None'; // or use the appropriate value representing "None"
}
})(current, previous);
This script should be added to a Business Rule that runs before the record is inserted or updated.
Regards,
Vaishnavi Lathkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 11:40 PM
Hi @harry24 ,
right click on field called as contact type check default value of that field if something is other remove it then you can see it will set as none
Thanks
BK