on 05-27-2010 9:08 PM
Hi,
I have a Tree browser which displays the data in a parent child relationship. My display column list contains "CHILDNAME, PARENTNAME, CHILD_KEY, PARENT_KEY". So when ever a folder is selected and tried to fetch the datalink value, then it fetches the value of the CHILD_KEY.
But I want the value of another column of the query output as the Datalink value.
Query returns the following columns:
CHILDNAME, PARENTNAME, CHILD_KEY, PARENT_KEY, COLVALUE1, COLVALUE2
Now in the display template I mapped the columns as
<Param Name="DisplayColumns" value="CHILDNAME, PARENTNAME, CHILD_KEY, PARENT_KEY">
If I change the above line of code to as shown below:
<Param Name="DisplayColumns" value="CHILDNAME, PARENTNAME, CHILD_KEY, PARENT_KEY, COLVALUE1">
then I dont have a method to fetch the value of the COLVALUE1.
I cannot keep this column name in between the list because it distorts the heirarchy view. But I really need the value of COLVALUE1 on selection of a folder in Tree View browser.
Could any body help!
I am using MII 11.5
Regards,
Rajesh.
Rajesh,
You have set things up accurately. The iBrowser applet tree folders are built based upon the columns 1 (Child folder) and 2 (Parent folder) and the datalinks are columns 3 (Child datalink) and 4 (Parent datalink).
What I would recommend doing is to merge COLVALUE1 into your query results in the CHILD_KEY column, using a comma or other delimiter to split or parse with javascript when you use the getSelectedDatalinkValue() method.
So, essentially use your merged column and grab what you need, when you need it in the script.
Regards,
Jeremy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Rajesh,
What you need to do is,
Append the COLVALUE1 in the Child Key and where ever this child is parent to some other node,append that COLVALUE1 value to the parent key as well.
So your query output should look like this.
<?xml version="1.0" encoding="UTF-8"?>
<Rowsets DateCreated="2007-05-02T07:37:37" EndDate="2007-05-02T16:59:53" StartDate="2007-05-02T16:59:53" Version="11.5.3">
<Rowset>
<Columns>
<Column Description="" MaxRange="1" MinRange="0" Name="CHILDNAME" SQLDataType="1" SourceColumn=" CHILDNAME"/>
<Column Description="" MaxRange="1" MinRange="0" Name="PARENTNAME" SQLDataType="1" SourceColumn="PARENTNAME"/>
<Column Description="" MaxRange="1" MinRange="0" Name="CHILD_KEY" SQLDataType="1" SourceColumn="CHILD_KEY"/>
<Column Description="" MaxRange="1" MinRange="0" Name="PARENT_KEY" SQLDataType="1" SourceColumn="PARENT_KEY"/>
<Column Description="" MaxRange="1" MinRange="0" Name="COLUMNVAL1" SQLDataType="1" SourceColumn="COLUMNVAL1"/>
</Columns>
<Row>
<CHILDNAME>Parent</CHILDNAME>
<PARENTNAME></PARENTNAME>
<CHILD_KEY>1_C1</CHILD_KEY>
<PARENT_KEY></PARENT_KEY>
<COLUMNVAL1>C1</COLUMNVAL1>
</Row>
<Row>
<CHILDNAME>Child</CHILDNAME>
<PARENTNAME>Parent</PARENTNAME>
<CHILD_KEY>2_C2</CHILD_KEY>
<PARENT_KEY>1_C1</PARENT_KEY>
<COLUMNVAL1>C2</COLUMNVAL1>
</Row>
<Row>
<CHILDNAME>Supporting Views</CHILDNAME>
<PARENTNAME>Child</PARENTNAME>
<CHILD_KEY>3</CHILD_KEY>
<PARENT_KEY>2_C2</PARENT_KEY>
<COLUMNVAL1>C3</COLUMNVAL1>
</Row>
<Row>
<CHILDNAME>Calculation Views</CHILDNAME>
<PARENTNAME>Child</PARENTNAME>
<CHILD_KEY>4</CHILD_KEY>
<PARENT_KEY>2_C2</PARENT_KEY>
<COLUMNVAL>C4</COLUMNVAL>
</Row>
</Rowset>
</Rowsets>
Now set DisplayColumns to "CHILDNAME, PARENTNAME, CHILD_KEY, PARENT_KEYu201D.
Regards,
Ruchi
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
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.