cancel
Showing results for 
Search instead for 
Did you mean: 

Using repeater on many columns and singerow

Former Member
0 Kudos

Hi,

I have tag query with 100 columns like datetime and rest all with different tag names.

Like       DateTime, Tag1, Tag2...........Tag100.

Query returns all tag values  in one row. Now I want to get tag name and value for each tag and store it in oracle.

If I use repeater on rowset/row of tag query, I have to map 100 parameters to  insert query to store tag values and I won't get tag names here.

So please how do I get tag name and tag value from tag query in trx to map those to insert sql query ,Since I am maintaining these two as columns in  oracle table.

Please guide me to resolve it.

Regards,

Rakesh.

Accepted Solutions (1)

Accepted Solutions (1)

former_member185280
Active Contributor
0 Kudos

You can repeat on the Columns to get the names.

Repeater XPath: Document_0.Output{/Rowsets/Rowset/Columns/Column}

Link editor to get column name XPath: Repeater_0.Output{/Column/@Name} or

    Repeater_0.Item{/Column/@Name} depending on your version

Then in the same loop get the columns value.

Link editor to get column value XPath:

Document_0.Output{/Rowsets/Rowset/Row[1]/*[#Repeater_0.CurrentItem#]}

Regards,
Christian

Former Member
0 Kudos

Hi Christian,

Thanks for your answer.

I am getting column name and values on repeater.

But I want skip the first column which is DateTime. I dont want this column to be repeated .

So to do this I have given xpath as Pcoquery.Results{/Rowsets/Rowset/Columns/Column[@Name!='DateTime']}

But it is not working.

Can you pls guid me how to skip the column on repeater.

Regards,

Rakesh.

Former Member
0 Kudos

Hi  Christian,


I have skipped first column using condition block.


Thankyou,

Rakesh.

Former Member
0 Kudos

Hi Rakesh,

The XPATH you are using to skip the 'DateTime' column is correct and works fine for me.

Just make sure the column name is exactly in the same case as you are getting in your tag query, usually it is 'DateTime' only

Thanks & Regards,

Anuj

Answers (0)