Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to use 'isHeading' property in RPE with DNG module

It's an emergency for me: Any help is appreciated. 

Please read this as steps I am trying to implement.

DNG module (contextBinding) 
     > If the first artifact Heading 1, print "heading section & Title" in heading 1 style 
     > if the second artifact is Heading 1.1, print "heading section & Title" in heading 2 style
     >  if the third artifact is not Heading, print Identifier \n Contents \n

I am playing with 'IsHeading' property, but not getting the result.

0 votes


Accepted answer

Permanent link
Hi

From the module data source, query the contextBinding

In that query container, put 2 containers, one with isHeading == "true" condition and one with isHeading == "false" condition.

In the container with isHeading == "true"
    Add a paragraph to print the "Title" and set the style using contextBinding/depth

In the container with isHeading == "false"
    Define a text dynamic data source using the contextBinding/about information
    and extract the text to be printed.

Hope it helps.


Ravi Gollapudi selected this answer as the correct answer

0 votes

Comments
Thanks for your quick replies, Pierre !

It did help. I could separate heading artifacts and text artifacts.

Do I have to use a javascript to set contextBinding/depth ?


One other answer

Permanent link
Hello

I am guessing some issue base on the info you provided.

The isHeading is a string "true" or "false", the test is not on a Boolean:
       isHeading == "true"

For the style, instead you can use the "depth".
If you set the style to the depth as is , RPE will understand that: 1 is header 1, 2 is header 2, etc

The heading number, you can use the "section"
I usually do not use that data.
I really on the word style to handle it.
Just make sure the word style display the heading number.


Pierre

0 votes

Comments
Hi Pierre,

I want to check the first artifact in the module is a heading. If it is, then I have to print only Section # and Title, and loop this until I see a non-heading artifact. When I see a non-heading artifact, I want to print its Identifier and Contents.

I hope I am clear now.

Thanks.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 19 '20, 12:53 p.m.

Question was seen: 1,138 times

Last updated: Mar 19 '20, 2:07 p.m.

Confirmation Cancel Confirm