12 Replies Latest reply on May 14, 2014 4:05 PM by philmodjunk

    'OnObjectEnter' - URL list ??



      'OnObjectEnter' - URL list ??


           I have created a field 'OnObjectEnter' which triggers an internet URL. I think I am misunderstanding how to make it work. I make the script trigger work by selecting a script for the trigger - correct? I have done that for one record. But when I go to the next record to do a different URL it already contains the trigger from the previous record. However, I need to assign a different URL to the 'URL field' for each individual record. Is there a list I need to create of URL's or Scripts?  I'm missing something here.

        • 1. Re: 'OnObjectEnter' - URL list ??

               Open URL can specify the contents of a field instead of literal text in quotes. Click the specify button and use the Specify Calculation dialog that opens to select the field that stores the URL (and that coincidentally is set up with your script trigger.)

          • 2. Re: 'OnObjectEnter' - URL list ??

                 Yep, I've got that process because that's exactly how I created the script.

                 But ....... I have like 30 different URL's. I've got a mental block somewhere here. I'm not understanding how to assign a single different URL to each different record.

                 My beginner level isn't letting me figure out how to have a different script trigger for each record for that field. When I right click on the field in layout mode and select Set Script Triggers then the OnObjectEnter script trigger that I create for that field allows only one script to be assigned to it. Isn't that correct? That one script only sends me to the one URL; but it is the same URL for all records.

                 Something just isn't making sense to me.

            • 3. Re: 'OnObjectEnter' - URL list ??

                        I'm not understanding how to assign a single different URL to each different record.

                   The URL is text entered into a text field. Each different record can have different URL text entered into this text field.

                   Here's an example from the Known Bugs List Database:

                   In Bug Report ID = 641 a field named "Link" stores the text: http://forums.filemaker.com/posts/91e377941d

                   In Bug Report ID = 640 the same "link" field stores the text: http://forums.filemaker.com/posts/f8478b53b3

                   so If I perform my Open URL script while the first record is current, this script goes to the first thread--the report an issue thread where the data for that bug report was taken. If I change records to the second record, the same script will open to a different forum thread--the issue report thread for that bug.

              • 4. Re: 'OnObjectEnter' - URL list ??

                     I'll look at the database and give it another shot. I'm close to getting it all but close only counts in horseshoes.

                • 5. Re: 'OnObjectEnter' - URL list ??

                       Careful, the script used to open the URL for that field is a more sophisticated script than the version we are discussing here. The method of storing the URL in a text field is the same, but the script does some other stuff besides opening the URL in the text field if a modifier key is held down and is set up to work from more than one field.

                  • 6. Re: 'OnObjectEnter' - URL list ??

                         Okay, I have studied the DB.

                         You are not using OnObjectEnter - are you?

                         You are using a script on the "Open URL" button that grabs the hyperlink out of the Link field - correct?

                         I did notice some very unfamiliar stuff in the Open URL script. I hate to ask the following but here goes - which script step(s) will be of concern for my use to just grab the URL from the field and get sent to the URL?

                    • 7. Re: 'OnObjectEnter' - URL list ??

                           By the way. Why am I timing out when typing my replies? I lose my reply and have to sign back in to the forum.

                      • 8. Re: 'OnObjectEnter' - URL list ??

                             Wait a second. I think all I need is the Set Variable step and the Open URL step - right?

                        • 9. Re: 'OnObjectEnter' - URL list ??

                               You do not need the set variable step. That's a complication I introduced into my script due to passing the URL from different fields as a script parameter. If you have just one URL field to use with this script, it's not needed.

                               Due to a noxious forum bug, please protect yourself with a "Select-All, copy to your clipboard" action just before submitting a private message or comment to this forum. The bug can lose your comment and log you out of the forum--forcing you to sign back in and re-enter the comment or message. By copying to the clipboard before posting, you can re-enter your message by pasting from the clipboard instead of having to retype it all over again.

                          • 10. Re: 'OnObjectEnter' - URL list ??

                                 My best guess is that this is not working for you due to the presence of some quotation marks that should not be there.

                                 I'm guessing that you have "TableName::FieldName" in your script step instead of: TableName::FieldName.

                            • 11. Re: 'OnObjectEnter' - URL list ??

                                   What I have have been playing with while talking with you is working. Here is a screen shot of it. Do you see anything wrong with what I am scripting? It's working anyway.

                              • 12. Re: 'OnObjectEnter' - URL list ??

                                     It just uses two script steps and a script parameter where a single script step can do exactly the same thing.

                                     The only advantage to this script version is that if you have several different URL fields, the same script can be used with all of them.

                                     But the original one line script does work when correctly set up.