Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Atvance Spotlight Search

Featured Replies

How is it possible to add a option to the search field that when its empty and you press return or enter to show all records again?

Also is the plug in the same as event script plug in? If so would it be possible to use the event script instead of the other one?

Thanks

TMAS

Spotlight Link

Are you talking about the Modify / Cancel buttons?

  • Author

No I'm talking about the search field itself, that when its idle and empty it displays all records just like the real spotlight on max. Type a search text into the field hit enter it lists the results, I delete the search text in the search field hit enter all records are visible.

TMAS

I suppose all you need is to modify your script to Show All Records when the field is empty. I cannot be sure without seeing the actual calculation auto-entered into the field, and the script itself.

I believe any plugin that can trigger a script on field modification can be used.

  • Author

Thanks

Just to make sure there is a file on the website link of the solution.

TMAS

comment has nailed the problem.

I down loaded the file and the script needs to be modified.

# This is where the power of the technique lies

# You can parse the data and break the search into

# separate Find Requests, or you can simply search

# against your Search Index field

#

Allow User Abort [ Off ]

# You need ALL of the above steps, DO NOT REMOVE THEM

Enter Find Mode [ ]

Set Field [ Spotlight::Search Index; Globals::Search Entry ]

Set Error Capture [ [color:red]On ]

Perform Find [ ]

[color:red]If [ Get ( LastError ) = 401 ]

[color:red]Show Custom Dialog [ Title: "No Records Found"; Message: "There were no records that met your request"; Buttons: “OK”,

“Cancel” ]

[color:red]Show All Records

End If

Notice that the original script had the Error Capture OFF (it needs to be turned ON)

The If to capture the Error of no records 401 was added

I added a Custom Dialong (so the users will know that there no records found to meet the request.

Added the Show All Records

HTH

Lee

Edited by Guest

Just to make sure there is a file on the website link of the solution.

Ah. I have only skimmed it. A lot of what he says there sounds - how should I put this politely - well, let's just say I don't get it. For example, I don't see why you need a special table with no records for the global field. As he says: ... go figure.

This is how I would do this, I think. I haven't tested this very thoroughly, and I am not much into plugins. You might want to review the documentation that comes with EventScript regarding controlling unwanted triggering, and maybe come up with something better.

Spotlight_.fp7.zip

  • Author

Thats a great solution, thanks so much. I do wonder if it would possible to have more fields beeing searched.

Thomas

Also can capitalization be ignored?

Edited by Guest
Added Question

I do wonder if it would possible to have more fields beeing searched.

Yes, of course. Just make your script create a new find request for each field to be searched, e.g.:

If [ IsEmpty ( Table::gSearchCriteria ) ]

Show All Records

Else

Set Error Capture [ On ]

Enter Find Mode [ ]

Set Field [ Table::SomeField; Table::gSearchCriteria ]

[color:red]# REPEAT AS REQUIRED

New Record/Request

Set Field [ Table::AnotherField; Table::gSearchCriteria ]

Perform Find [ ]

End If

Also can capitalization be ignored?

I believe it is, by default - unless you have chosen Unicode as the indexing language for the field.

  • 2 weeks later...
  • Author

Hi there I advanced the solution and spotlight search now is not working anymore because of different tables. How would you change the script to use the spotlight throughout the solution. Also your example file for searching different fields, it mentions "New Record" Is this correct?

Thanks

iPassword_2_v008_2.fp7.zip

Sorry, I don't understand your first question. Your file seems to work fine - but the script performs a find, i.e. it modifies the FOUND set. It looks like you are more interested in changing what's shown in the portal - that is another matter.

In Find mode, New Record/Request creates a new request.

  • Author

Sorry, Spotlight works fine with the version you made (right table) but now I have different sorted tables on the left and it seems the find function in the left portals wont work anymore maybe due to the relation ships.

Hope that make sense.

One other problem you might know is: if you see the portal row it highlights by script.If I apply the same script in the second portal in the second tab and I hit the script button it jumps back to the first tab to select the row.

Thomas

Edited by Guest
Add a quesstion

I made a stab in the dark, but I am not really sure how it's supposed to work - it seems too complex to me, mixing found sets and relationships.

iPassword_2_v008_2.fp7.zip

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.