- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2022 07:21 AM
I'm trying to create a progress bar on a change form which showed the percentage of change tasks which are closed against a change. Does anyone achieved this just yet?
Thanks!
Solved! Go to Solution.
- Labels:
-
Multiple Versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2022 07:29 AM
Hi there,
You could try a UI Macro which should calculate this for you.
You would need to create a new field to capture the actual % through a business rule but convert this to a progressbar using the macro below
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<j:set var="jvar_n"/>
<g2:evaluate var="jvar_user" object="true">
var value = current.u_percentage_complete;
gs.info('Value is: ' + value);
value;
</g2:evaluate>
<div class="progress" style="width: 323px;position: relative;left: 37%;">
<div id="${jvar_n}" class="progress-bar" role="progressbar" style="width:$[jvar_user]%;" aria-valuemin="0" aria-valuenow="50" aria-valuemax="100">
<span class="sr-only">50%</span>
</div>
</div>
<a>${jvar_source.getValue('u_percentage_complete')}</a>
</j:jelly>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2022 07:29 AM
Hi there,
You could try a UI Macro which should calculate this for you.
You would need to create a new field to capture the actual % through a business rule but convert this to a progressbar using the macro below
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<j:set var="jvar_n"/>
<g2:evaluate var="jvar_user" object="true">
var value = current.u_percentage_complete;
gs.info('Value is: ' + value);
value;
</g2:evaluate>
<div class="progress" style="width: 323px;position: relative;left: 37%;">
<div id="${jvar_n}" class="progress-bar" role="progressbar" style="width:$[jvar_user]%;" aria-valuemin="0" aria-valuenow="50" aria-valuemax="100">
<span class="sr-only">50%</span>
</div>
</div>
<a>${jvar_source.getValue('u_percentage_complete')}</a>
</j:jelly>