For Duration field, how to show only days?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2018 08:55 PM
For Duration field, how to show only days?
I have tried as per documentation:
But its not showing
Its not working for days, for minutes its working
To show only days, how its achievable , can anyone point out...
Attribute set for minutes
Duration field converted to Minutes
Attribute set for days
But its not showing only days:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2018 09:55 PM
Hello Ratnesh,
for show only days in duration field you need to hide min and sec. and we can achive this using script.
OnLoad client:
function onLoad() {
g_form.getElement('ni.u_community.calendar_durationdur_hour').style.display='none';
g_form.getElement('ni.u_community.calendar_durationdur_sec').style.display='none';
g_form.getElement('ni.u_community.calendar_durationdur_min').style.display='none';
//---inspacted element---> ni.u_community.calamder-duration_hour
}
and for getting element of the field you just inspect the field:
1>press F12
2>click on the arrow button
3>then hewer mouse on the field section you get the element name.
4>provide that name in your script like: ni.u_community.calamder-duration_hour.
HOPE THIS HELPS!!!! MARK CORRECT OR HELPFUL.
Regards,
Mohammed Iqbal
www.dxsherpa.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-03-2018 08:14 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2018 10:08 PM
So I think the attribute you're applying only removes parts of the input if the higher unit isn't accepted anymore, meaning, when you say max_unit=mintues it will no longer show days.
There isn't a min_unit attribute that I'm aware of, personally I'd open a HI ticket and ask.
You could just make a integer field and have that set a duration field else where in a business rule, kinda clunky but it would work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-03-2018 08:15 PM
I will raise with Hi-Portal to see if there is something like this.
Thanks for details.