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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

CLI to get an issue's Section number (document)

Eric1
1-Newbie

CLI to get an issue's Section number (document)

Hi all,

Harder question than the last one. I am working with documents and need to pull out the same info as when you export it to Word. I can find everything but the Section number, i.e. 1, 1.1, 1.1.1, etc. ("Section" is what is shown in the GUI when editing).

I used "im fields --fields=name,type,description" to get a list of all field names in our system and then used a Python script to send "im issues --fields="xxx"" for every field name that im fields returned. None of the returned info was the section number. It has to be in there somewhere since it is shown in exported documents?

I was thinking I could maybe use im exportissues but then I found this in the documenation "For documents, the Section field is not exported." which seems to shoot down that idea. (Tried it anyway, docs are correct...)

Would appreciate any suggestions.

Thanks,
Eric

PS any better documentation than the CLI Reference for Workflows and Documents and the man command line?

1 ACCEPTED SOLUTION

Accepted Solutions
Eric1
1-Newbie
(To:mrump)

Hi Matthias,

I'm with a medical device company and everything revolves around printed documents (much easier when dealing with the FDA). Since the Section number is a key visual indicator in the printed document I have to be able to show the current and historical Section numbers for the project I'm working on.

However, I think I have a workaround! "im printissue DocID" generates HTML that shows the relationship (proper order) of all the top level document elements within the document, which was the missing piece of the puzzle. I can now use those IDs with im viewissue DocElemID to see the Contains IDs (which are returned in the correct order) and reconstruct the document hierarchy with Python.

Can you see any problem with this approach? We are using shared content and it looks like it works with that.

While I have your eyes... I see things like this in the issue output: 94005ay 94004xyz

Any idea what "ay" and "xyz" mean?

Thanks!

Eric

View solution in original post

5 REPLIES 5

Unfortunately, I don't know of any way to get the section information to export. I am going to follow up with one of our docs specialist, and I'll post if they have any suggestions.

As for better documentation for CLI commands, please try this document as well:

http://www.ptc.com/WCMS/files/149442/en/AdminCLIReference_Integrity_10_2.pdf

mrump
14-Alexandrite
(To:Eric1)

Sorry Eric,

the Section field is some kind of "computed field - defined by the relationship tree in your document". You can think of it as comparable to the "ordered List" element in HTML.

This data is stored nowhere in the item itself and therefore cannot be reported or exported directly.

At least in I10 the "Section" can be used as a "output field" in the MS Word integration and also in the Export templates, but only for documents not single items, as the relationship context is crucial.

This is the price you pay for being able to use sub-documents and shared content.

In prior versions you had to calculate the the Section manually during report generation by calling some JavaScript, which was a pain in the a...

HTH Matthias

BTW:

I asked the same question 5 Years ago......you'll learn to live with it.

Sections and paragraphs are overrated! The only truth is the Item-ID

Eric1
1-Newbie
(To:mrump)

Hi Matthias,

I'm with a medical device company and everything revolves around printed documents (much easier when dealing with the FDA). Since the Section number is a key visual indicator in the printed document I have to be able to show the current and historical Section numbers for the project I'm working on.

However, I think I have a workaround! "im printissue DocID" generates HTML that shows the relationship (proper order) of all the top level document elements within the document, which was the missing piece of the puzzle. I can now use those IDs with im viewissue DocElemID to see the Contains IDs (which are returned in the correct order) and reconstruct the document hierarchy with Python.

Can you see any problem with this approach? We are using shared content and it looks like it works with that.

While I have your eyes... I see things like this in the issue output: 94005ay 94004xyz

Any idea what "ay" and "xyz" mean?

Thanks!

Eric

mrump
14-Alexandrite
(To:Eric1)

Hi Eric,

the character you see are relationship flag indicators.

They are defined by your Integrity Administrator.

e.g.

screen3.JPG

If you can see the character, it means that the flag is TRUE.

Regards Matthias

That is a very good workaround, Eric. We generally try to focus on solutions within our product, but for some things there are much more powerful tools (such as Python) that can do things we are not currently able to. I think that this solution should work very well for what you're trying to do.

Top Tags