If statement in UI Macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2022 02:48 AM
Hello folks, I want show a hyper link if value is not empty. Can you please help me to correct the below script.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<j2:set var="jvar_source_wid" value="$[current.getValue('u_souce_id')]" />
<j:if test="${jvar_source_wid !=''}">
<div style="text-align:center;">
<a href="https://wd3.myworkday.com/sourceid/$[jvar_source_wid].htmld" target="_blank">Open Workday Profile
</a>
</div>
</j:if>
</j:jelly>
- Labels:
-
UI Framework Next Experience
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2022 03:14 AM
Hi Prasad,
The syntax for if else in a UI macro is like this :
<j:if test="condition" >
<!-- your code here -->
</j:if>
Please follow this thread it may help you :
https://community.servicenow.com/community?id=community_question&sys_id=96b487e9dbd8dbc01dcaf3231f96...