- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 05:20 AM
Hey Guys,
Im trying put an error or info message under the field. But it's not reflecting.
g_form.showFieldMsg("start_date","Selected Date is in past, Select a valid date","info",true);
suggest me something here
Solved! Go to Solution.
- Labels:
-
Change Management
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 05:58 AM
Hi,
Was that not happening before?
Actually, you know what...hmm...try clearing the field first THEN do your field message.
g_form.setValue('start_date', ''); // Setting the variable as empty
g_form.showFieldMsg('start_date', "Test 123", 'error');
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 06:14 AM
Yea, you should be fine now to do more with it, info or error, etc.
I think it was basically because you were clearing the field AFTER the message which was probably happening about the same time and so it was causing a slight glitch there.
Please mark any other reply from others, as Helpful, if it was.
Take care!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 05:40 AM
Hi Naveen,
You can achieve this by using UI policy no need to write a script
Please refer below link to know how to achieve by ui policy
Mark ✅ Correct if my answer solves your issue and also mark 👍 Helpful if you find my response worthy.
Thanks & Regards
Himanshu Dubey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2020 05:57 AM
Hi Himashu,
Thank you for idea.
I had did it with UI policy only i beginning but due to changes in requirement. Approached script .
Script is fine and perfect.
Just trying to get an error msg under field.
Thank you