Page 1 of 1

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

Posted: Mon Jul 29, 2024 4:46 pm
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]"]

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

Posted: Tue Jul 30, 2024 8:21 am
by freddyp
All things XML are case-sensitive: last() is a valid function, Last() is not.

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

Posted: Tue Jul 30, 2024 9:55 pm
by rgpepper
Thanks!
I let some Google searches that showed it as "Last" lead me astray.