AnsweredAssumed Answered

Why does my scrip crashes my app in web browsers via WebDirect but not in FM clients

Question asked by jorber on Aug 30, 2017
Latest reply on Aug 30, 2017 by planteg

I have created a script intended for search while typing. The field ’table::SerachContact’ trigger the script below ’OnObjectModify’. When typing in the field the script is triggered to do a search for Contacts. This works fine for in my FileMaker Pro Advanced 16.0.2.205 client. However, when it is executed in any web browser by WebDirect (FileMaker Server 16.0.1.184) the script works fine during the two first changes of the field but after that the app crashes after and I have to reload the app and log in again. Can I do this in another way to ensure that it works also in WebDirect?

 

 

Variables used:

table::SearchContact (Text, global storage)

table::Contact (Text, indexed)

Script:

1. Set Error Capture [ On ]

2. Set Variable [ $Find; Value:table::SearchContact ]

3. Perform Find [ Specified Find Requests: Find Records; Criteria: table::Contact: “$Find” ] [ Restore ]

4. If [ not Get ( FoundCount ) and IsEmpty ( table::SearchContact ) ]

5.      Show All Records

6.      Go to Record/Request/Page [ Last ]

7. End If

8. Go to Field [ table::SearchContact ]

Outcomes