Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Table format in Calculated Textfield JWT

Leena Pratheepan April 3, 2025

Hello,

I have a question. Does anyone have experience with JWT Calculated Textfield? I want to build a risk matrix  (4x4 Matrix) and have created an HTML code. However, it is not working. I am not getting a table structure. Can someone help me with this?"

 

Thanks in advance.

 

 

 

Leena

 

2 answers

1 accepted

0 votes
Answer accepted
Sergio García-Consuegra _Decadis AG_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2025

Hi @Leena Pratheepan ,

My name is Sergio, and I'm a member of the support team from Decadis.

I've noticed that there were a couple of things which had to be fixed from the expression you wrote in your message.

Before giving you the expression corrected, please take a look to this screenshot to have a better understanding of which parts were missing:

Expression.png

As it's mentioned in the screenshot, it seems that there was mising a "+" symbol and also closing the quotes in the lines 5 and 6 from your expression. Here you have the expression modified, now it should work as expected!

(
## issueType(14002) = "Risiko"
%{issue.cf17320} != NULL and %{issue.cf17321} != NULL
?
"<p>" + "Schadenshöhe" + "</p>" +
"<table border=\"1\" cellspacing=\"1\" cellpadding=\"5\"><tbody>" +
"<tr><td></td>" + "<td align = \"center\">1</td>" + "<td align = \"center\">2</td>" + "<td align = \"center\">3</td>" + "<td align = \"center\">4</td></tr>" +
"<tr><td>4</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 4 and %{issue.cf17321} = 1 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 4 and %{issue.cf17321} = 2 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 4 and %{issue.cf17321} = 3 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 4 and %{issue.cf17321} = 4 ? "X" : "") + "</td></tr>" +
"<tr><td>3</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 3 and %{issue.cf17321} = 1 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 3 and %{issue.cf17321} = 2 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 3 and %{issue.cf17321} = 3 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 3 and %{issue.cf17321} = 4 ? "X" : "") + "</td></tr>" +
"<tr><td>2</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 2 and %{issue.cf17321} = 1 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 2 and %{issue.cf17321} = 2 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 2 and %{issue.cf17321} = 3 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 2 and %{issue.cf17321} = 4 ? "X" : "") + "</td></tr>" +
"<tr><td>1</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 1 and %{issue.cf17321} = 1 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 1 and %{issue.cf17321} = 2 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 1 and %{issue.cf17321} = 3 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 1 and %{issue.cf17321} = 4 ? "X" : "") + "</td></tr>" +
"</tbody></table>"
:
""
)

Could you please try using these expression and let me know if it worked?

Also, if you have any other doubt regarding calculated fields or JWT, I would like to suggest you creating a request in our customer portal, where we will gladly assist you with any doubt you have regarding JWT or any of the rest of our apps! 

I hope this solution works for you!

Best regards,
Sergio

Leena Pratheepan April 4, 2025

Thank you, It works

Leena Pratheepan April 4, 2025

One problem I am facing is with the display view; it is not showing in a tabular format. What could be the reason for this?

0 votes
Leena Pratheepan April 3, 2025

(
## issueType(14002) = "Risiko"
%{issue.cf17320} != NULL and %{issue.cf17321} != NULL
?
"<p>" + "Schadenshöhe" + "</p>"
"<table border=\"1\" cellspacing=\"1\" cellpadding=\"5\"><tbody>" +
"<tr><td></td>" + "<td align = \"center\">1</td>" + "<td align = \"center\">2</td>" + "<td align = \"center\">3</td> + "<td align = \"center\">4</td></tr>" +
"<tr><td>4</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 4 and %{issue.cf17321} = 1 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 4 and %{issue.cf17321} = 2 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 4 and %{issue.cf17321} = 3 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 4 and %{issue.cf17321} = 4 ? "X" : "") + "</td></tr>" +
"<tr><td>3</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 3 and %{issue.cf17321} = 1 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 3 and %{issue.cf17321} = 2 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 3 and %{issue.cf17321} = 3 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 3 and %{issue.cf17321} = 4 ? "X" : "") + "</td></tr>" +
"<tr><td>2</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 2 and %{issue.cf17321} = 1 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 2 and %{issue.cf17321} = 2 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 2 and %{issue.cf17321} = 3 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 2 and %{issue.cf17321} = 4 ? "X" : "") + "</td></tr>" +
"<tr><td>1</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 1 and %{issue.cf17321} = 1 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 1 and %{issue.cf17321} = 2 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 1 and %{issue.cf17321} = 3 ? "X" : "") + "</td>" +
"<td align = \"center\">" + (%{issue.cf17320} = 1 and %{issue.cf17321} = 4 ? "X" : "") + "</td></tr>" +
"</tbody></table>"
:
""
)

Suggest an answer

Log in or Sign up to answer