- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2023 10:33 PM
Hi All,
How to change help text of field based on value present in that field?
for example i have vehicle dropdown field, and it has two values car and bike. so here if bike is selected then field help text should be "bike is selected" and if car is selected then field help text should be "car is selected" .
Thanks in Advance,
Sachin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2023 11:14 PM - edited 05-28-2023 11:17 PM
@Sachin G K1
You can try onChange the client script on your field to display field message with the current value, Use the following code in onChange client script
if(newValue)
{
g_form.showFieldMsg('pass field_name here', 'The value is : '+newValue, 'info');
}
If I could help you with my response you can mark it as helpful and correct as it benefits future viewers
Thanks,
Sai Kumar B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2023 11:14 PM - edited 05-28-2023 11:17 PM
@Sachin G K1
You can try onChange the client script on your field to display field message with the current value, Use the following code in onChange client script
if(newValue)
{
g_form.showFieldMsg('pass field_name here', 'The value is : '+newValue, 'info');
}
If I could help you with my response you can mark it as helpful and correct as it benefits future viewers
Thanks,
Sai Kumar B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2023 11:22 PM
you cannot change help text dynamically.
You can show field message based on value using onChange client script + as suggested by Sai
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2023 11:57 PM
Hi Sachin,
You may also give hint to the field using right click on the field name>configure Dictionary>under Related list you can find the choice. here give the Hint to the choice. It will appear while hovering the choice. OR you may better use show field message based on value in OnChange Client script as Sai suggested.
If My answer helps you in anyways mark it as helpful and correct.
Thanks,
Lavanya P