Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Variable Value within an HTML Variable

Ariomar de Deus
Tera Contributor

I have an HTML variable containing the code below, but I need to insert the value of another variable into this HTML code so that when the catalog item is loaded on the portal, the value of the variable appears. Could someone help me?

Replace Nome do funcionario with the variable value; the technical name of the variable is client_employee

 

<div style="width: 5.45cm; height: 8.68cm; position: relative; overflow: hidden; border: 0.03cm solid #000; border-radius: 0.3cm;"><img style="position: absolute; bottom: -0.65cm; right: -0.85cm; width: 4.77cm; height: 4.77cm; object-fit: cover; z-index: 0;" src="/sys_attachment.do?sys_id=cracha" alt="Foto_do_colaborador">
<div style="position: absolute; width: 4.6cm; height: 2.2cm; left: 0.43cm; top: 2.16cm; font-size: 17px; color: #3e51f6; z-index: 2; display: flex; align-items: center; justify-content: center; text-align: center;">Nome do funcionario</div>
<img style="position: absolute; top: 0; left: 0; width: 5.45cm; height: 8.68cm; object-fit: cover; z-index: 1; pointer-events: none;" src="/sys_attachment.do?sys_id=ef6753e53b9bf6104bec936765e45ae2" alt="Roxo-escuro"></div>

 

1 ACCEPTED SOLUTION

Tanushree Maiti
Tera Sage

Hi @Ariomar de Deus 

 

You need onChange Client script in order to populate the other variable type in the HTML type variable.

 

Step by step instruction is given in this post. Please check

https://www.servicenow.com/community/developer-forum/variable-data-to-html-type-variable/m-p/1363141

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

View solution in original post

1 REPLY 1

Tanushree Maiti
Tera Sage

Hi @Ariomar de Deus 

 

You need onChange Client script in order to populate the other variable type in the HTML type variable.

 

Step by step instruction is given in this post. Please check

https://www.servicenow.com/community/developer-forum/variable-data-to-html-type-variable/m-p/1363141

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: