if you are trying to return the middle value (489525363) it would be
~result = GetValue ( $val ; 2 )
I'm parsoing XML
This let is an If statement.
The next step is to set the value at 2.
Im trying to get this to trigger the if as 1, it's 0
There are several custom functions for parsing XML. If you do not have FMPAdvanced to edit Custom Functions, most of them can be adapted to scripting and calculations.
1. http://www.briandunning.com/filemaker-custom-functions/ (search for XML)
the work has been done and/or perhaps you can learn from them enough to revise what you are trying to do?
I was at Devcon, i have 15 Pro Advanced.
Thank you for your post!
I am going to move this thread from the FileMaker Community Feedback Space, which is specifically for input on the Community itself, to the Discussions Space where you should receive more views and potentially more feedback on this topic!
you need to isolate the Boolean condition. Try changing the following line:
~result = GetValue ( $val ; 1 ) = $searchTerm
~result = ( GetValue ( $val ; 2 ) = $searchTerm )
after testing - it looks like the parentheses are not the issue. Sorry.
I think you have the order of operations wrong.
Here's a little testbed:
Let ( [
VC = 1 ;
searchterm = "PRONmbr" ;
postResult = "PRONmbr>489525363</PRONmbr" ;
postList = Substitute ( postResult ; [ ">" ; ¶ ] ; [ "<" ; ¶ ] ) ;
val = GetValue ( postList ; VC ) ;
isItTrue = val = searchTerm
which indeed is true.