Using [Last()] In XML/XPath Parsing SQL Results

Post Reply
rgpepper
Member
Posts: 83
Joined: Wed Oct 14, 2015 2:09 am

Using [Last()] In XML/XPath Parsing SQL Results

Post by rgpepper »

Does Switch not support the use of "[Last()]" in specifying a Metadata field? Appears not.
I have a SQL query returning multiple hits most of the time, and I just want the last one out of the results.
i.e.: [Metadata.Text:Dataset="FMP_Data",Model="XML",Path="/Log/SQLStatementValue/Row[Last()]/Column[1]"]
freddyp
Advanced member
Posts: 1129
Joined: Thu Feb 09, 2012 3:53 pm

Re: Using [Last()] In XML/XPath Parsing SQL Results

Post by freddyp »

All things XML are case-sensitive: last() is a valid function, Last() is not.
rgpepper
Member
Posts: 83
Joined: Wed Oct 14, 2015 2:09 am

Re: Using [Last()] In XML/XPath Parsing SQL Results

Post by rgpepper »

Thanks!
I let some Google searches that showed it as "Last" lead me astray.
Post Reply