We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Jelly Script not printing output

venkatsaladi
Tera Contributor

Hello Community, I started learning jelly script for building UI pages and I was strucked at the begining, can you provide help why the below code is not working correctly, although I wrote correctly.  hardware variable is not printing

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null">
<j2:set var="hardware" value="keyboard"/>
<p>${hardware} is out of stock currently</p>
</j:jelly>

 image.png

1 ACCEPTED SOLUTION

Raghav Sharma24
Giga Patron

Try below:

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null">
<j:set var="jvar_hardware" value="keyboard"/>
<p>${jvar_hardware} is out of stock currently</p>
</j:jelly>

 

View solution in original post

4 REPLIES 4

GlideFather
Tera Patron

Hi @venkatsaladi 

 

try to remove the "2" in:

<j2:set var="hardware" value="keyboard"/>

to be:

<j:set var="hardware" value="keyboard"/>

 

Let me know whether it helped


✂-----Cutting-out-the---✦AI-noise✦---All-replies-written-and-vouched-for-by-GlideFather---

@GlideFather I tried still not working

 

Raghav Sharma24
Giga Patron

Try below:

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null">
<j:set var="jvar_hardware" value="keyboard"/>
<p>${jvar_hardware} is out of stock currently</p>
</j:jelly>

 

@Raghav Sharma24 your solution is working, but could you please tell me why you used "jvar_"?