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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Translate the entire conversation x

Generate a Dynamic table with Arbortext styler

Partner
14-Alexandrite

Generate a Dynamic table with Arbortext styler

I need to generate a table with the styler that will grow according to the count of a specific element within the document.  For example, the table with header (Column1, Column2, Column3) will have 2 rows if the content of element  EnactAuthority has 2 Identification elements within it.  It is not a problem for me to count the elements using an XPath predicate.  It's more in the way of injecting the content of the Identification elements content inside that table that is my issue.

 

XML content : 

Screenshot 2025-02-01 141140_cache.png

My target table withing styler : Screenshot 2025-02-01 141449.png

The content of the 2 rows will come from Identification/LongTitle, Identification/Id and Identification/EnablingIdentification/Ref

 

You have been so far very helpful, once again thanks for your help community !

ACCEPTED SOLUTION

Accepted Solutions

I think you have a problem with your XPath expressions. When you ask for "/LongTitle", the slash at the beginning indicates you want it to look for that element at the root of the document, not in the current context. If you want to get the LongTitle element as a child of the current element (the Identification element if I'm reading the original post correctly), you should use "./LongTitle" (note the dot before the slash), or simply "LongTitle". So, try rewriting your Regulation expression like this:

 

concat(string(LongTitle), ' ', string(Id))

 

View solution in original post

6 REPLIES 6

Hi @Partner,

Thank you for your question. 

Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.

Also, feel free to add any additional information you think might be relevant. 

 

Regards,

Vivek N
Community Moderation Team

Partner
14-Alexandrite
(To:vnamboodheri)

I do have more information in fact.

The perfect way to do this is to use a custom table. I have created the custom table with all the necessary elements,

Screenshot 2025-02-07 113027.png

 

If I use these custom element table (with the addition of 2 cells) everything works as expected BUT those not match my need since I need to concatenate  values coming from multiple referred elements using XPath. So I then figured to use generated cells but no items (text) is showing.  Here is a view of my generated cells wanted.

Screenshot 2025-02-07 113356.png

As I said, that did not work, there must be a syntax error somehow.

Merci, thanks.

I think you have a problem with your XPath expressions. When you ask for "/LongTitle", the slash at the beginning indicates you want it to look for that element at the root of the document, not in the current context. If you want to get the LongTitle element as a child of the current element (the Identification element if I'm reading the original post correctly), you should use "./LongTitle" (note the dot before the slash), or simply "LongTitle". So, try rewriting your Regulation expression like this:

 

concat(string(LongTitle), ' ', string(Id))

 

Partner
14-Alexandrite
(To:ClayHelberg)

I have closed the ticket too fast.  My Xpath got accepted but still the table is not showing up.

Can you be more specific about what you mean by "the table is not showing up"? Does that mean you get no table at all? Or that you get a table but it's empty? Maybe a screenshot of the output would help.

Partner
14-Alexandrite
(To:ClayHelberg)

The table shows if I don't use Generated cells with the following settings.Screenshot 2025-03-11 144900.png

And shows like this in the document : Screenshot 2025-03-11 144842.png

As soon as I set something as Generated cells, no grid shows at all.

Announcements

Top Tags