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

RaghavSh
Kilo 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
MVP 2023
LinkedIn

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

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


@GlideFather I tried still not working

 

RaghavSh
Kilo 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
MVP 2023
LinkedIn

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