It's all about the answers!

Ask a question

Get file name using configuration file


James G (116) | asked Nov 01 '18, 11:53 a.m.
edited Nov 01 '18, 12:15 p.m.

 Hi,

I am wondering if it is possible to access the name of the excel file in a configuration file. I see in the custom attributes section here - https://jazz.net/wiki/bin/view/Main/RQMExcelWordImporter - that there is a mention of using the excel document's properties:

"Along the same lines, you can access the properties of the spreadsheet that  you are working on. Examples:

requirement.dc:title=property(“Title”)

 requirement.dc:creator=property("Author")

requirement.jzalm:owner=property(“Company”) "

I tried doing this in my configuration file by doing this:

    testcase.category term=property(“Title”).value="validate"

 however, in the generated xml it just shows
    <category term=property("Title") value="validate"/>

So I am lead to believe that it either doesn't work or this doesn't do what I hoped it would. If it is possible to get the document's name, is it also possible to get the current tab's name?

2 answers



permanent link
Mehul Patel (9695) | answered Nov 02 '18, 2:41 a.m.
FORUM MODERATOR

James,


Getting current tab name is not possible, but it is possible to get the document name by using configuration syntax- 
            - property("full name") // full name with extension and path
            - property("name") // name with extension

Regards,
Mehul


permanent link
James G (116) | answered Nov 02 '18, 9:05 a.m.

 I tried using 

    testcase.category term=property(“name”).value="test"

It results in

<category term=property(“name”) value="test"/>

Is there something I'm missing here?


Comments
Mehul Patel commented Nov 04 '18, 2:46 a.m.
FORUM MODERATOR

I did not get the last part of syntax - .value="test", could you please explain?


James G commented Nov 07 '18, 1:34 p.m. | edited Nov 07 '18, 1:34 p.m.

The .value="test" should just set the subcategory to "test". I'd like to try to set a category based on the file name and then a subcategory based on something in the sheet. That part works fine. I'm just struggling with getting the filename with property("name") or property("full name")

Your answer


Register or 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.