Give dynamic row names and edit color of cell

0
Jo posted this 4 weeks ago

Hello, i want to create a table with test results. In the first column should be an increasing number (1,2,3,...). That looks like this:

  1. Test A
  2. Test B
  3. Test C

Now my question is: Can i define the number, that it depend on the test? Example: Everytime when Test A starts, the number is set to 1?

1.Test A

2.Test B

3.Test C

4.Test D

1.Test A

2.Test B

And my second question: How can I edit the Color of a cell, when the test is failed? I found the "Visual Format" at the field, but I don't know how to handle it.

Thank's for your help,

Regards Jo

Last edited 4 weeks ago

1 Posts
1 Points
2 Comments
Order By: Standard | Newest | Votes
0
jles posted this 2 weeks ago

Hi Jo,

Thank you for your questions. Let me answer them.

The answer to your first question is yes but only if you use XML data sources. You can use the new VAR tagging element in a combination with the IF element. The new VAR element allows you have variables that you can then use in expressions (using the 'var-element-value' XPath function) and display their (current) values. So, you could have one VAR element, with name, e.g. 'MyVar' before the table and setting its value to 0. Then, in your repeated row, wrapped in the LIST element, you would have another VAR with the same name and the expression that increments the VAR's value: var-element-value('MyVar') + 1. Then you would need the third VAR element inside an IF tagging element that would reset the VAR's value to 0 if the IF element's expression would hold true (for example, @TestId = 'A').

As for your second question, please read this article about how to use "Visual Formatting": https://blog.docentric.com/2017/03/01/docentric-toolkit-5-0-released/

Please let me know if this helped.

Thanks,

Jure

117 Posts
243 Points
0
Smith posted this 5 days ago

1 Posts
2 Points

Our 6201 members have posted 268 times in 79 discussions