February 8, 200718 yr 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
February 8, 200718 yr 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
February 8, 200718 yr 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.
February 9, 200718 yr Author Thanks Just to make sure there is a file on the website link of the solution. TMAS
February 9, 200718 yr 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 February 9, 200718 yr by Guest
February 9, 200718 yr 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
February 16, 200718 yr 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 February 16, 200718 yr by Guest Added Question
February 16, 200718 yr 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.
February 27, 200718 yr 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
February 27, 200718 yr 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.
February 27, 200718 yr 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 February 27, 200718 yr by Guest Add a quesstion
February 27, 200718 yr 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