on 01-04-2009 11:03 PM
I'm writing a BLS transaction to scan through all of my templates and give me a list of what type each template is. I've been looking at some of the predefined queries such as Predefined/TemplateListQuery and it will give me a list of templates that match a doctype. However what I really need to find out if there is a predefined query will give me the template type if I give it the template path. For instance if I send it a filepath of Doug/SomeTemplatename it will tell me if the template is a iChart, or SQL query template. I'm thinking of using Predefined/TemplateDetailQuery but I don't know what the proper parameters are to send to this.
My BLS transaction already can recursively scan and give me all the templates, so I already have that part done. So really all that is left now is finding out what the template type is.
Programmatically loading a template is a bit tricky if you don't know the "secret code".
The following example shows you how to load the template details using the TemplateService, which will return an XML document in MII Rowset format with two columns, ParameterName and ParameterValue.
http://localhost/Lighthammer/Illuminator?Service=TemplateService&Mode=Load&TemplateName=Defaults/TagQuery&Content-Type=text/xml
The first item will always be the DocType. You can use an XPath expression such as
/Rowsets/Rowset/Row[0]/ParameterValue
...or...
/Rowsets/Rowset/Row[ParameterName == 'DocType']/ParameterValue
...to access the template type.
Edited by: Rick Bullotta on Jan 5, 2009 8:49 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh just for completeness for others that might view this thread, Xpath uses only a single equal sign
/Rowsets/Rowset/Row[ParameterName = 'DocType']/ParameterValue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Rick that was EXACTLY what I was looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You'll have to load the template in order to find out. If a directory structure or naming convention was used you might be able to use all the templates in a given location or use the Mask parameter to get the xxxxChart ones.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.