Why isn't EJS taking over?

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
zeddave
New User
Posts: 3
Joined: Mon Jul 27, 2020 3:48 pm
First Name: David
Last Name: Mosley
Company Name: Self-Employeed Contractor
Country: United States
Contact:

Why isn't EJS taking over?

Post by zeddave »

I followed the example (1) for EJS within an HTML container. I had the "html" as "This is a test = <%= LEVEL1_TEXT %>", and the "user defined data" as LEVEL1_TEXT. But, the end result renders exactly that I have in the "html" variable. "This is a test = <%= LEVEL1_TEXT %>". I've used EJS in the past, outside profound, and it appears that EJS isn't being recognized and not properly templating the contents. I do see the /ejs/ejs.min.js file being loaded. So, I'm just wondering what else I could be missing. Thanks.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Why isn't EJS taking over?

Post by Scott Klement »

I created a display file like this:
ejsdisplay.png
ejsdisplay.png (2.95 KiB) Viewed 1759 times
I set TESTME to 'Hello' then EXFMT my screen. The 'Hello' was printed in the HTML container (as well as the output field) as expected. I'm not sure what you're doing differntly, but it seems to work fine for me.
zeddave
New User
Posts: 3
Joined: Mon Jul 27, 2020 3:48 pm
First Name: David
Last Name: Mosley
Company Name: Self-Employeed Contractor
Country: United States
Contact:

Re: Why isn't EJS taking over?

Post by zeddave »

Thanks, Scott. Oddily enough, when I created a brand new program and display file it worked properly. The problem, that I was experiencing, was with a display file that was converted to Rich Display. Thanks, again.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Why isn't EJS taking over?

Post by Scott Klement »

Hmmm... I don't see why it'd matter if its a converted screen or not.

It looks like Emily from our Support team reached out to you yesterday asking for some additional information. Make sure you follow-up with her, and she'll take good care of you.
zeddave
New User
Posts: 3
Joined: Mon Jul 27, 2020 3:48 pm
First Name: David
Last Name: Mosley
Company Name: Self-Employeed Contractor
Country: United States
Contact:

Re: Why isn't EJS taking over?

Post by zeddave »

I believe I was able to figure out the problem, and it's when I use the "longName" for the "user defined data" variable.

When I use a “longName” of “level0_text”, the “fieldName” is “LEVEL00001”, and the EJS fails.

But, when change the variable name to just ‘level0” (which means the fieldName remains “level0”), then the EJS will work.

Also, I did send this to Emily.

Thanks, Scott.
David
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests