Haven't looked in detail at your HTML scraping code, but it looks reasonable; assuming that that gives you a list of values, either use a loop …
If [ IsEmpty ( $web ) ]
Set Variable [ $message ; "Web problem" ]
Set Variable [ $i ; $i + 1 ]
Set Variable [ $currentline ; GetValue ( $web ; $i ) ]
Set Variable [ $found ; $found + ( $currentLine = $local ) ]
Exit Loop if [ $found or $i = ValueCount ( $web ) ]
Set Variable [ $message ; Case ( $found ; "No problem" ; "Not in list" ) ]
… or try:
Set Variable [ $message ; Case ( IsEmpty ( $web ) ; "Web problem" ; PatternCount ( ¶ & $web & ¶ ; ¶ & $local & ¶ ) ; "No problem" ; "Not in list" )
I have attempted it no luck. I get the mesasge that the number is not in the list when in actual fact it is.
I have attached a link to sample fmp12 I quickly put together to test. I changed the $local vairable to include alpha characters as well along with the filter.
Do not understand why it cannot find the value.
Why not do a 'PatternCount ( $webText ; "102-103" )'? That way you do not have to check line by line at all.
Ok I discovered what the probleme was with ( ¶ & $web & ¶ ; ¶ & $local & ¶ )
I amended this to ( ¶ & $web & ¶ ; $local ) given that the local value does not need to paragraph in a loop.
However, I did notice that the WEB Viewer does need to have its Cache refreshed else it will continue to store old values until new refresh. So did set the webviewer as a reload.
Thanks again for your script Erolst.
Your answer helped me get to the bottom of what was wrong with the script. So thank you as well. It does make sense and I will give that a shot now to see if it makes it easier. Appreciate it.